mirror of
https://github.com/zhigang1992/firebase-tools.git
synced 2026-06-10 23:48:46 +08:00
* 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
22 lines
610 B
Bash
Executable File
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.*
|