agent updates
This commit is contained in:
14
test/assertions.test.js
Normal file
14
test/assertions.test.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
const Assertions = require('../src/helper/assertionUtils.js');
|
||||
|
||||
test('assertNoNaN does not throw for valid nested arrays', () => {
|
||||
const assertions = new Assertions();
|
||||
assert.doesNotThrow(() => assertions.assertNoNaN([1, [2, 3, [4]]]));
|
||||
});
|
||||
|
||||
test('assertNoNaN throws when NaN exists in nested arrays', () => {
|
||||
const assertions = new Assertions();
|
||||
assert.throws(() => assertions.assertNoNaN([1, [2, NaN]]), /NaN detected/);
|
||||
});
|
||||
Reference in New Issue
Block a user