1
0
Fork 0
mirror of synced 2024-06-29 19:41:03 +12:00

Add test command

This commit is contained in:
Adria Navarro 2024-03-19 23:28:03 +01:00
parent b62044b4b8
commit abbe9deb1c
3 changed files with 9 additions and 5 deletions

View file

@ -11,7 +11,9 @@
"build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null",
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
"check:types": "tsc -p tsconfig.json --noEmit --paths null" "check:types": "tsc -p tsconfig.json --noEmit --paths null",
"test": "jest",
"test:watch": "yarn test --watchAll"
}, },
"dependencies": { "dependencies": {
"@budibase/types": "0.0.0", "@budibase/types": "0.0.0",

View file

@ -4,10 +4,10 @@ set -e
if [[ -n $CI ]] if [[ -n $CI ]]
then then
# Running in ci, where resources are limited # Running in ci, where resources are limited
echo "jest --coverage --maxWorkers=2 --forceExit --bail $@" echo "jest --coverage --maxWorkers=2 --forceExit --bail $@"
jest --coverage --maxWorkers=2 --forceExit --bail $@ jest --coverage --maxWorkers=2 --forceExit --bail $@
else else
# --maxWorkers performs better in development # --maxWorkers performs better in development
echo "jest --coverage --maxWorkers=2 --forceExit $@" echo "jest --coverage --detectOpenHandles $@"
jest --coverage --maxWorkers=2 --forceExit $@ jest --coverage --detectOpenHandles $@
fi fi

View file

@ -6,6 +6,8 @@ import { TestConfiguration } from "../../../tests"
describe("auth", () => { describe("auth", () => {
const config = new TestConfiguration() const config = new TestConfiguration()
afterAll(config.afterAll)
describe("resetUpdate", () => { describe("resetUpdate", () => {
it("providing a valid code will update the password", async () => { it("providing a valid code will update the password", async () => {
await context.doInTenant(structures.tenant.id(), async () => { await context.doInTenant(structures.tenant.id(), async () => {