Skip to content

Commit

Permalink
use cross-env to pass environment variables to test runner (#2724)
Browse files Browse the repository at this point in the history
use cross-env to pass environment variables to test runner and include environment variables in unit test
  • Loading branch information
JosiasAurel authored Dec 18, 2024
1 parent cb48996 commit 821a146
Show file tree
Hide file tree
Showing 3 changed files with 517 additions and 190 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [opened, reopened, edited, synchronize]

env:
PUBLIC_MAX_LOOP_TIME_MS=1500
PUBLIC_MAX_ITERATIONS=2000

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "astro dev",
"build": "astro build",
"test": "deno run --allow-read ./tests/sprigfuzzy.js",
"test:unit": "vitest"
"test:unit": "cross-env PUBLIC_MAX_ITERATIONS=2000 PUBLIC_MAX_LOOP_TIME_MS=1500 vitest"
},
"dependencies": {
"@astrojs/preact": "^2.0.1",
Expand All @@ -29,6 +29,7 @@
"@wcj/markdown-to-html": "^3.0.2",
"astro": "2.7.0",
"bcryptjs": "^2.4.3",
"cross-env": "^7.0.3",
"dotenv": "^16.3.1",
"firebase-admin": "^11.10.1",
"js-beautify": "^1.15.1",
Expand Down
Loading

0 comments on commit 821a146

Please sign in to comment.