Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: npm install

- name: Run Prettier
run: npm run prettier
run: node --run prettier

- name: Run ESLint
run: npm run lint
run: node --run lint
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: npm install

- name: Run Tests
run: npm run test:unit
run: node --run test:unit
e2e-test:
name: E2E Tests
runs-on: ubuntu-latest
Expand All @@ -52,4 +52,4 @@ jobs:
run: npm install

- name: Run Tests
run: npm run test:e2e
run: node --run test:e2e
2 changes: 1 addition & 1 deletion .github/workflows/update-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: npm install && npm update nodejs-latest-linker --save

- name: Update Redirect Links
run: node scripts/build-r2-symlinks.mjs && npm run format
run: node scripts/build-r2-symlinks.mjs && node --run format
env:
CF_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
CF_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ The steps below will give you a general idea of how to prepare your local enviro
9. Run the following to confirm that linting and formatting are passing.

```bash
npm run format
npm run test:unit
npm run test:e2e
node --run format
node --run test:unit
node --run test:e2e
```

10. To run the worker locally, see [Dev Setup](./docs/dev-setup.md).
Expand All @@ -130,11 +130,11 @@ This repository contains a few scripts and commands for performing numerous task
<details>
<summary>Commands for Testing, Maintaining, and Contributing to the Worker</summary>

- `npm run format` Formats the code to the repository's standards.
- `npm run lint` Lints the code to the repository's standards.
- `npm run test:unit` Runs the [Unit Tests](./COLLABORATOR_GUIDE.md#unit-tests) to ensure individual components are working as expected.
- `npm run test:e2e` Runs the [E2E Tests](./COLLABORATOR_GUIDE.md#e2e-tests) to ensure requests act as expected.
- `npm run build:handlebars` Compiles the Handlebars templates. **Required for any changes to the templates to take affect**.
- `node --run format` Formats the code to the repository's standards.
- `node --run lint` Lints the code to the repository's standards.
- `node --run test:unit` Runs the [Unit Tests](./COLLABORATOR_GUIDE.md#unit-tests) to ensure individual components are working as expected.
- `node --run test:e2e` Runs the [E2E Tests](./COLLABORATOR_GUIDE.md#e2e-tests) to ensure requests act as expected.
- `node --run build:handlebars` Compiles the Handlebars templates. **Required for any changes to the templates to take affect**.

</details>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"format": "prettier --check --write \"**/*.{ts,js,mjs,json,md}\"",
"prettier": "prettier --check \"**/*.{ts,js,mjs,json,md}\"",
"lint": "eslint ./src",
"test": "npm run test:unit && npm run test:e2e",
"test": "node --run test:unit && node --run test:e2e",
"test:unit": "node --test --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=spec --test-reporter-destination=stdout --import=tsx ./tests/unit/index.test.ts",
"test:e2e": "wrangler deploy --dry-run --outdir=dist && node --test --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=spec --test-reporter-destination=stdout --import=tsx ./tests/e2e/index.test.ts",
"build:handlebars": "node scripts/compile-handlebars.js"
Expand Down
Loading