Skip to content

Commit

Permalink
Change to use export map
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 8, 2023
1 parent d765e40 commit 2a7cf87
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 24 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion test/children.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('children', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/code.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(code)', async function (t) {
await t.test('should throw if `code` is not a text', async function () {
Expand Down
11 changes: 4 additions & 7 deletions test/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import test from 'node:test'

test('assert', async function (t) {
await t.test('should expose the public api', async function () {
nodeAssert.deepEqual(Object.keys(await import('../index.js')).sort(), [
'_void',
'assert',
'literal',
'parent',
'wrap'
])
nodeAssert.deepEqual(
Object.keys(await import('mdast-util-assert')).sort(),
['_void', 'assert', 'literal', 'parent', 'wrap']
)
})
})
2 changes: 1 addition & 1 deletion test/definition.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(definition)', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/footnote-definition.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(footnoteDefinition)', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/footnote-reference.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(footnoteReference)', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/heading.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(heading)', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/image-reference.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(imageReference)', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/image.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(image)', async function (t) {
await t.test('should throw without `url`', async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/link-reference.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(linkReference)', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/link.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(link)', async function (t) {
await t.test('should throw if `link` is not a parent', async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/list-item.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(listItem)', async function (t) {
await t.test(
Expand Down
2 changes: 1 addition & 1 deletion test/list.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(list)', async function (t) {
await t.test('should throw if a `list` is not a parent', async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/node.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('node', async function (t) {
await t.test('should throw if not given a node (#1)', async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/root.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(root)', async function (t) {
await t.test('should throw if a `root` is not a parent', async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/table.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodeAssert from 'node:assert/strict'
import test from 'node:test'
import {assert} from '../index.js'
import {assert} from 'mdast-util-assert'

test('assert(table)', async function (t) {
await t.test('should throw if `table` is not a parent', async function () {
Expand Down

0 comments on commit 2a7cf87

Please sign in to comment.