1
0
Fork 0
mirror of synced 2024-06-27 02:20:35 +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:dev": "yarn prebuild && tsc --build --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": {
"@budibase/types": "0.0.0",

View file

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

View file

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