Files
Bryan Kendall daa9fd58dc move emulator suite tests into scripts folder (#3035)
* move emulator tests into scripts folder

* add run script

* wip

* setup the emulator tests to be compiled and then run

* clean up lines

* upgrade ts-node

* clean up run script

* fix package-lock merge
2021-01-15 09:48:05 -08:00

22 lines
610 B
Bash
Executable File

#!/bin/bash
set -ex
# Clean the destination of the upcoming build.
rm -rf dev
# Run a special build for these tests and the source code.
tsc --build scripts/emulator-tests/tsconfig.dev.json
# Setup a cleanup process to run before exit.
function cleanup() {
# Remove the built artifacts.
rm -rf dev
}
trap cleanup EXIT
# Need to copy `package.json` to the directory so it can be referenced in code.
cp package.json dev/package.json
# Run the tests from the built dev directory.
mocha \
--require ts-node/register \
--require src/test/helpers/mocha-bootstrap.ts \
dev/scripts/emulator-tests/*.spec.*