Add test command
This commit is contained in:
parent
b62044b4b8
commit
abbe9deb1c
|
@ -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",
|
||||||
|
|
|
@ -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
|
|
@ -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 () => {
|
||||||
|
|
Loading…
Reference in New Issue