Skip to content

Commit

Permalink
test(Build): prevent ESM build test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
lemoustachiste committed Jul 17, 2023
1 parent 88d7dd0 commit 420ef97
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
modulePaths: [
'<rootDir>/src/',
'<rootDir>/node_modules'
'<rootDir>/node_modules',
'<rootDir>/dist'
],
transform: {
'^.+\\.((j|t)s)$': 'ts-jest'
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"readable-stream": "npm:vite-compatible-readable-stream@^3.6.1",
"secp256k1": "^4.0.2",
"serialize-error": "github:blockchain-certificates/serialize-error",
"sha.js": "github:blockchain-certificates/sha.js#fix/jest-exports-esm",
"sha256": "^0.2.0",
"xmlhttprequest": "^1.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion test/build/verifier-es.test.build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ global.XMLHttpRequest = FakeXmlHttpRequest;
describe('verifier build test suite', function () {
it('throws a deprecation error with a v1 certificate', async function () {
const certificate = new Certificate(FIXTURES.TestnetV1Valid);
expect(async () => {
await expect(async () => {
await certificate.init();
}).rejects.toThrow('Verification of v1 certificates is not supported by this component. ' +
'See the python cert-verifier for v1.1 verification ' +
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"baseUrl": "src",
"module": "commonjs",
"module": "ESNext",
"resolveJsonModule": true,
"esModuleInterop": true,
"sourceMap": true,
Expand Down

0 comments on commit 420ef97

Please sign in to comment.