diff --git a/test/test.ts b/test/test.ts index 44cd22a..16e376c 100644 --- a/test/test.ts +++ b/test/test.ts @@ -652,6 +652,19 @@ test('is.array', t => { t.throws(() => { assert.array([1, '2'], assert.number); }); + + t.notThrows(() => { + const x: unknown[] = [1, 2, 3]; + assert.array(x, assert.number); + x[0].toFixed(0); + }); + + t.notThrows(() => { + const x: unknown[] = [1, 2, 3]; + if (is.array(x, is.number)) { + x[0].toFixed(0); + } + }); }); test('is.function', t => {