Skip to content

Commit e2baf00

Browse files
test: add strict float array assertions
Signed-off-by: alejandrodev-vn <huytra264@gmail.com>
1 parent e8b4c0b commit e2baf00

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎test/parallel/test-assert-deep-equal-floatarray-length.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ for (const FloatArray of [Float16Array, Float32Array, Float64Array]) {
1111
const empty = new FloatArray(0);
1212
const emptyEqual = new FloatArray(0);
1313

14+
// Check strict comparisons before installing the loose-mode getter guards.
15+
assert.deepStrictEqual(actual, equal);
16+
assert.notDeepStrictEqual(actual, different);
17+
assert.notDeepStrictEqual(actual, shorter);
18+
assert.notDeepStrictEqual(actual, empty);
19+
assert.deepStrictEqual(empty, emptyEqual);
20+
1421
// Own properties must not replace the view's intrinsic element count.
1522
for (const view of [actual, equal, different, shorter, empty, emptyEqual]) {
1623
Object.defineProperty(view, 'length', {

0 commit comments

Comments
 (0)