Fix tests
This commit is contained in:
parent
65acd9076c
commit
6e27435092
4 changed files with 4 additions and 8 deletions
6
.github/workflows/check.yml
vendored
6
.github/workflows/check.yml
vendored
|
|
@ -53,11 +53,7 @@ jobs:
|
||||||
cargo machete
|
cargo machete
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: scripts/test.sh
|
||||||
cargo test --verbose
|
|
||||||
cargo test --features serde
|
|
||||||
cargo test --features wasm
|
|
||||||
wasm-pack test --node --features wasm
|
|
||||||
|
|
||||||
publish-crate:
|
publish-crate:
|
||||||
needs: build
|
needs: build
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
// Read the actual WASM file and convert to base64 for testing
|
// Read the actual WASM file and convert to base64 for testing
|
||||||
const wasmPath = path.join(__dirname, '../../pkg/reconcile_bg.wasm');
|
const wasmPath = path.join(__dirname, '../../pkg/reconcile_text_bg.wasm');
|
||||||
const wasmBuffer = fs.readFileSync(wasmPath);
|
const wasmBuffer = fs.readFileSync(wasmPath);
|
||||||
const wasmBase64 = wasmBuffer.toString('base64');
|
const wasmBase64 = wasmBuffer.toString('base64');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
preset: 'ts-jest/presets/js-with-babel-esm',
|
preset: 'ts-jest/presets/js-with-babel-esm',
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^reconcile-text/reconcile_bg\\.wasm$': `<rootDir>/__mocks__/wasm.js`,
|
'^reconcile-text/reconcile_text_bg\\.wasm$': `<rootDir>/__mocks__/wasm.js`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
2
reconcile-js/package-lock.json
generated
2
reconcile-js/package-lock.json
generated
|
|
@ -24,7 +24,7 @@
|
||||||
},
|
},
|
||||||
"../pkg": {
|
"../pkg": {
|
||||||
"name": "reconcile-text",
|
"name": "reconcile-text",
|
||||||
"version": "0.4.3",
|
"version": "0.4.9",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue