fix: update integration tests to use a root beforeAll hook that loads the environment variables and assigns values to the api key and base url to be used when constructing the onspring client used in the integration tests

This commit is contained in:
StevanFreeborn
2023-02-14 22:47:16 -06:00
parent 4fe1d7c4a7
commit 8e1d9051ae
7 changed files with 41 additions and 70 deletions
+4 -3
View File
@@ -40,10 +40,11 @@
"format-staged": "pretty-quick --staged",
"format": "pretty-quick",
"build": "npm run lint-fix && npm run tests && npm run format && npm run clean && tsc --project tsconfig.cjs.json & tsc --project tsconfig.esm.json",
"test": "mocha -r ts-node/register",
"test:unit": "mocha -r ts-node/register",
"test:integration": "mocha -r ts-node/register -r integrationTests/mochaRootHooks.ts",
"tests:unit": "mocha -R progress -r ts-node/register ./tests/**/*.spec.ts",
"tests:integration": "mocha -R progress -r ts-node/register ./integrationTests/**/*.spec.ts",
"tests": "mocha -R progress -r ts-node/register ./tests/**/*.spec.ts ./integrationTests/**/*.spec.ts",
"tests:integration": "mocha -R progress -r ts-node/register -r integrationTests/mochaRootHooks.ts ./integrationTests/**/*.spec.ts",
"tests": "mocha -R progress -r ts-node/register ./tests/**/*.spec.ts -r ts-node/register -r integrationTests/mochaRootHooks.ts ./integrationTests/**/*.spec.ts",
"test-coverage": "nyc npm run tests:unit",
"test-coverage:ci": "nyc npm run tests",
"prepare": "husky install"