automerge/scripts/ci/js_tests
Alex Good 56563a4a60
Add a storage-v2 feature flag
The new storage implementation is sufficiently large a change that it
warrants a period of testing. To facilitate testing the new and old
implementations side by side we slightly abuse cargo's feature flags and
add a storage-v2 feature which enables the new storage and disables the
old storage.

Note that this commit doesn't use `--all-features` when building the
workspace in scripts/ci/build-test. This will be rectified in a later
commit once the storage-v2 feature is integrated into the other crates
in the workspace.

Signed-off-by: Alex Good <alex@memoryandthought.me>
2022-08-20 17:36:26 +01:00

20 lines
622 B
Text
Executable file

set -e
THIS_SCRIPT=$(dirname "$0");
WASM_PROJECT=$THIS_SCRIPT/../../automerge-wasm;
JS_PROJECT=$THIS_SCRIPT/../../automerge-js;
yarn --cwd $WASM_PROJECT install;
# 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;