File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import 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'
47
58test ( '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+ )
724
825 assert . deepEqual (
926 x ( ) ,
Original file line number Diff line number Diff line change 33import assert from 'node:assert/strict'
44import test from 'node:test'
55import { u } from 'unist-builder'
6- import { x } from '../index.js '
6+ import { x } from 'xastscript '
77
88test ( 'name' , ( ) => {
99 assert . deepEqual ( < a /> , x ( 'a' ) , 'should support a self-closing element' )
You can’t perform that action at this time.
0 commit comments