Skip to content

Commit

Permalink
test: inline distro tests
Browse files Browse the repository at this point in the history
Simplifies our build pipeline.
  • Loading branch information
nikku committed Mar 6, 2024
1 parent 31fde9c commit 1005a22
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"version": "11.0.0",
"description": "XML import/export for documents described with moddle",
"scripts": {
"all": "run-s lint test test:distro",
"all": "run-s lint test",
"build": "rollup -c",
"dev": "npm test -- --watch",
"lint": "eslint . --ext cjs,js",
"test": "mocha --reporter=spec --recursive test/spec",
"test:distro": "mocha --reporter=spec --recursive test/distro",
"test": "mocha --reporter=spec --recursive test",
"pretest": "run-s build",
"prepare": "run-s build"
},
Expand Down
23 changes: 0 additions & 23 deletions test/distro/moddle-xml.cjs

This file was deleted.

27 changes: 27 additions & 0 deletions test/integration/distro.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const {
expect
} = require('chai');

const pkg = require('../../package.json');

const pkgExports = pkg.exports['.'];


describe('integration', function() {

describe('distro', function() {

it('should expose CJS bundle', function() {

const {
Reader,
Writer
} = require('../../' + pkgExports['require']);

expect(Reader).to.exist;
expect(Writer).to.exist;
});

});

});

0 comments on commit 1005a22

Please sign in to comment.