Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Dec 13, 2024
1 parent 7c6c2df commit a0c3ea5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"types": "./index.d.ts",
"default": "./pkg/standalone.js"
},
"./standalone": {
"types": "./index.d.ts",
"default": "./pkg/standalone.js"
},
"default": {
"types": "./index.d.cts",
"default": "./pkg/node.cjs"
}
},
"./standalone": {
"types": "./index.d.ts",
"default": "./pkg/standalone.js"
}
},
"files": [
Expand Down
13 changes: 13 additions & 0 deletions test/alias-exports.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import chai from 'chai';

const { expect } = chai;


describe('package.json#export aliases', () => {
it(`'.' === './standalone' when importing`, async () => {
let main = await import('content-tag');
let standalone = await import('content-tag/standalone');

expect(main.Preprocessor).to.equal(standalone.Preprocessor);
});
});

0 comments on commit a0c3ea5

Please sign in to comment.