File tree 2 files changed +20
-3
lines changed 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
2
import test from 'node:test'
3
- import { x } from '../index.js'
3
+ import { x } from 'xastscript'
4
+ import * as coreMod from 'xastscript'
5
+ import * as jsxCoreMod from 'xastscript/jsx-runtime'
6
+ import * as jsxDevMod from 'xastscript/jsx-dev-runtime'
4
7
5
8
test ( 'xastscript' , ( ) => {
6
- assert . equal ( typeof x , 'function' , 'should expose a function' )
9
+ assert . deepEqual (
10
+ Object . keys ( coreMod ) . sort ( ) ,
11
+ [ 'x' ] ,
12
+ 'should expose the public api (`/`)'
13
+ )
14
+ assert . deepEqual (
15
+ Object . keys ( jsxCoreMod ) . sort ( ) ,
16
+ [ 'Fragment' , 'jsx' , 'jsxs' ] ,
17
+ 'should expose the public api (`/jsx-runtime`)'
18
+ )
19
+ assert . deepEqual (
20
+ Object . keys ( jsxDevMod ) . sort ( ) ,
21
+ [ 'Fragment' , 'jsxDEV' ] ,
22
+ 'should expose the public api (`/jsx-dev-runtime`)'
23
+ )
7
24
8
25
assert . deepEqual (
9
26
x ( ) ,
Original file line number Diff line number Diff line change 3
3
import assert from 'node:assert/strict'
4
4
import test from 'node:test'
5
5
import { u } from 'unist-builder'
6
- import { x } from '../index.js '
6
+ import { x } from 'xastscript '
7
7
8
8
test ( 'name' , ( ) => {
9
9
assert . deepEqual ( < a /> , x ( 'a' ) , 'should support a self-closing element' )
You can’t perform that action at this time.
0 commit comments