Skip to content

Commit

Permalink
chore: replace the word "unittest" to "unit test"
Browse files Browse the repository at this point in the history
It is said that "unittest" is not a word, but a Python module name.

Update workflow job name, package.json script name, and some comments in
the codebase.
  • Loading branch information
wdzeng committed Sep 26, 2024
1 parent e9057b6 commit d590e6d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
workflow_dispatch:

jobs:
unittests:
name: Run unittests
unit-test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,10 +23,10 @@ jobs:
with:
version: ^9.7.0
run_install: true
- run: pnpm unittest
- run: pnpm test:unit-test
upload-test:
name: Run upload test
needs: unittests
needs: unit-test
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
Expand All @@ -46,7 +46,7 @@ jobs:
publish:
name: Publish action
needs:
- unittests
- unit-test
- upload-test
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"scripts": {
"build": "pnpm clean && pnpm transpile && cp action.yml dist",
"transpile": "esbuild src/index.ts --platform=node --target=node20 --minify --bundle --outfile=dist/index.cjs",
"test": "pnpm unttest && pnpm test:upload",
"unittest": "vitest --silent",
"test": "pnpm test:unit-test && pnpm test:upload",
"test:unit-test": "vitest --silent",
"test:upload": "pnpm clean && pnpm transpile:test:upload && node -r dotenv/config dist/test/upload.cjs dotenv_config_path=test/.env.local",
"transpile:test:upload": "esbuild test/upload.ts --platform=node --target=node20 --minify --bundle --outfile=dist/test/upload.cjs",
"lint": "eslint src --fix",
Expand Down
2 changes: 1 addition & 1 deletion test/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copy this file to .env.local and `pnpm test` to run unittest.
# Copy this file to .env.local and `pnpm test:unit=test` to run unit tests.
TEST_ADDON_GUID=your-addon-guid
TEST_JWT_ISSUER=your-jwt-issuer
TEST_JWT_SECRET=your-jwt-secret

0 comments on commit d590e6d

Please sign in to comment.