is/test/test-node.js
2025-10-31 09:35:47 -04:00

15 lines
524 B
JavaScript

import assert from 'node:assert';
import {test} from 'node:test';
import is, {assert as isAssert} from '../distribution/index.js';
// Note: this test is separate from the rest of the tests, as it requires
// preserving whitespace. The tsimp modifies the source and does not
// properly preserve the intended test case
test('is.class', () => {
const minifiedClass = class{}; // eslint-disable-line keyword-spacing
assert.ok(is.class(minifiedClass));
assert.doesNotThrow(() => {
isAssert.class(minifiedClass);
});
});