Skip to content

Commit

Permalink
ci: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Sep 11, 2024
1 parent f4babca commit c6679e2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/integration/strict/ensure-strict.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { skip } from '../../../src/modules/helpers/skip.js';
import { getRuntime, nodeVersion } from '../../../src/parsers/get-runtime.js';
import { describe } from '../../../src/modules/helpers/describe.js';
import { assert } from '../../../src/modules/essentials/assert.js';

if ((nodeVersion && nodeVersion < 16) || getRuntime() === 'deno') {
skip('Strict method is available from Node.js 16');
}

describe('Ensure strict', async () => {
const { strict } = await import('../../../src/modules/essentials/strict.js');

const actual = Object.create(null);
const expected = { name: 'John' };

actual.name = 'John';

assert.deepEqual(actual, expected);
strict.notDeepEqual(actual, expected);
});

0 comments on commit c6679e2

Please sign in to comment.