74a8af6ca6
We add a script for running the js tests in `scripts/ci/js_tests`. This script can also be run locally. We move the `automerge-js` package to below the `automerge-wasm` crate as it is specifically testing the wasm interface. We also add an action to the github actions workflow for CI to run the js tests.
17 lines
595 B
Text
Executable file
17 lines
595 B
Text
Executable file
THIS_SCRIPT=$(dirname "$0");
|
|
WASM_PROJECT=$THIS_SCRIPT/../../automerge-wasm;
|
|
JS_PROJECT=$THIS_SCRIPT/../../automerge-wasm/automerge-js;
|
|
|
|
# This will take care of running wasm-pack
|
|
yarn --cwd $WASM_PROJECT build;
|
|
# If the dependencies are already installed we delete automerge-wasm. This makes
|
|
# this script usable for iterative development.
|
|
if [ -d $JS_PROJECT/node_modules/automerge-wasm ]; then
|
|
rm -rf $JS_PROJECT/node_modules/automerge-wasm
|
|
fi
|
|
# --check-files forces yarn to check if the local dep has changed
|
|
yarn --cwd $JS_PROJECT install --check-files;
|
|
yarn --cwd $JS_PROJECT test;
|
|
|
|
|
|
|