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/);
});
