File tree Expand file tree Collapse file tree 11 files changed +14
-13
lines changed Expand file tree Collapse file tree 11 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 2323 ],
2424 "sideEffects" : false ,
2525 "type" : " module" ,
26- "main" : " index.js" ,
27- "types" : " index.d.ts" ,
26+ "exports" : " ./index.js" ,
2827 "files" : [
2928 " lib/" ,
3029 " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
44import { x } from 'xastscript'
5- import { toXml } from '../index.js '
5+ import { toXml } from 'xast-util-to-xml '
66
77test ( '`element` attributes' , async function ( t ) {
88 await t . test ( 'should ignore missing attributes' , async function ( ) {
Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
4- import { toXml } from '../index.js '
4+ import { toXml } from 'xast-util-to-xml '
55
66test ( '`cdata`' , async function ( t ) {
77 await t . test ( 'should not encode `cdata`s' , async function ( ) {
Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
4- import { toXml } from '../index.js '
4+ import { toXml } from 'xast-util-to-xml '
55
66test ( '`comment`' , async function ( t ) {
77 await t . test ( 'should serialize `comment`s' , async function ( ) {
Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
4- import { toXml } from '../index.js '
4+ import { toXml } from 'xast-util-to-xml '
55
66test ( 'toXml()' , async function ( t ) {
77 await t . test ( 'should expose the public api' , async function ( ) {
8- assert . deepEqual ( Object . keys ( await import ( '../index.js' ) ) . sort ( ) , [ 'toXml' ] )
8+ assert . deepEqual ( Object . keys ( await import ( 'xast-util-to-xml' ) ) . sort ( ) , [
9+ 'toXml'
10+ ] )
911 } )
1012
1113 await t . test ( 'should throw on non-nodes' , async function ( ) {
Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
4- import { toXml } from '../index.js '
4+ import { toXml } from 'xast-util-to-xml '
55
66test ( '`doctype`' , async function ( t ) {
77 await t . test ( 'should serialize doctypes without `name`' , async function ( ) {
Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import test from 'node:test'
33import { x } from 'xastscript'
4- import { toXml } from '../index.js '
4+ import { toXml } from 'xast-util-to-xml '
55
66test ( '`element`' , async function ( t ) {
77 await t . test ( 'should serialize `element`s w/o children' , async function ( ) {
Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
4- import { toXml } from '../index.js '
4+ import { toXml } from 'xast-util-to-xml '
55
66test ( '`instruction`' , async function ( t ) {
77 await t . test (
Original file line number Diff line number Diff line change 11import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
4- import { toXml } from '../index.js '
4+ import { toXml } from 'xast-util-to-xml '
55
66test ( '`raw`' , async function ( t ) {
77 await t . test ( 'should encode `raw`s' , async function ( ) {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'
22import test from 'node:test'
33import { u } from 'unist-builder'
44import { x } from 'xastscript'
5- import { toXml } from '../index.js '
5+ import { toXml } from 'xast-util-to-xml '
66
77test ( '`root`' , async function ( t ) {
88 await t . test ( 'should serialize `root`s' , async function ( ) {
You can’t perform that action at this time.
0 commit comments