Skip to content

Commit 188f66f

Browse files
Merge pull request #225 from remarkablemark/test/module
test(module): write ES module unit test
2 parents c81c0e8 + cb97ad0 commit 188f66f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- run: npm run lint
2020
- run: npm run lint:dts
2121
- run: npm run test:ci
22+
- run: npm run test:module
2223
- run: npm run test:integration
2324
- run: npm run benchmark
2425
- name: Coveralls

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"release": "standard-version --no-verify",
1717
"test": "jest --coverage --testPathIgnorePatterns test/integration/",
1818
"test:ci": "npm test -- --ci",
19+
"test:module": "node --experimental-modules test/module/index.mjs",
1920
"test:integration": "npm run build && jest test/integration/",
2021
"test:watch": "npm test -- --watch"
2122
},

test/module/index.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import assert from 'assert';
2+
import parse, {
3+
domToReact,
4+
htmlToDOM,
5+
attributesToProps
6+
} from '../../index.mjs';
7+
8+
[parse, domToReact, htmlToDOM, attributesToProps].forEach(func => {
9+
assert.strictEqual(typeof func, 'function');
10+
});

0 commit comments

Comments
 (0)