-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathutilities.test.mjs
38 lines (30 loc) · 1.01 KB
/
utilities.test.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { describe, it } from 'node:test';
import assert from 'assert';
import {
canTextBeChildOfNode,
ELEMENTS_WITH_NO_TEXT_CHILDREN,
isCustomComponent,
PRESERVE_CUSTOM_ATTRIBUTES,
returnFirstArg,
setStyleProp,
} from '../../esm/utilities.mjs';
describe('utilities', () => {
it('exports "isCustomComponent" function', () => {
assert.strictEqual(typeof isCustomComponent, 'function');
});
it('exports "setStyleProp" function', () => {
assert.strictEqual(typeof setStyleProp, 'function');
});
it('exports "PRESERVE_CUSTOM_ATTRIBUTES" boolean', () => {
assert.strictEqual(typeof PRESERVE_CUSTOM_ATTRIBUTES, 'boolean');
});
it('exports "ELEMENTS_WITH_NO_TEXT_CHILDREN" set', () => {
assert.ok(ELEMENTS_WITH_NO_TEXT_CHILDREN instanceof Set);
});
it('exports "canTextBeChildOfNode" function', () => {
assert.strictEqual(typeof canTextBeChildOfNode, 'function');
});
it('exports "returnFirstArg" function', () => {
assert.strictEqual(typeof returnFirstArg, 'function');
});
});