Skip to content

Commit

Permalink
chore(k6): Fix function context test (redwoodjs#9358)
Browse files Browse the repository at this point in the history
**Changes**
1. Fixes the function context test to be correct - it should fail and it
does.
2. Adds a final output which shows the pass/fail of each test.
3. Is no longer verbose by default.
4. Is now run with `yarn test:k6` rather than `yarn benchmark` as it's
not really benchmarking so to speak.

**Future/Maybe here**
1. Update to include a server file version of the testing.

**Notes**
1. This isn't the most elegant of code but I'll update to address that
above point before I refactor it to be all nice and tidy.
  • Loading branch information
Josh-Walker-GM authored Oct 30, 2023
1 parent a070dac commit 91270ed
Show file tree
Hide file tree
Showing 17 changed files with 339 additions and 303 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"packages/studio/web"
],
"scripts": {
"benchmark": "tsx ./tasks/benchmark/run-benchmarks.mts",
"build": "lerna run build",
"build:clean": "yarn node ./tasks/clean.mjs",
"build:clean:super": "git clean -fdx && yarn && yarn build",
Expand All @@ -31,7 +30,8 @@
"release": "node ./tasks/release/releaseCLI.mjs",
"smoke-test": "node ./tasks/smoke-tests/smoke-tests.mjs",
"test": "lerna run test --concurrency 2 -- --colors --maxWorkers=4",
"test-ci": "lerna run test --concurrency 2 -- --colors --maxWorkers"
"test-ci": "lerna run test --concurrency 2 -- --colors --maxWorkers",
"test:k6": "tsx ./tasks/k6-test/run-k6-tests.mts"
},
"resolutions": {
"vscode-languageserver": "6.1.1",
Expand Down
64 changes: 0 additions & 64 deletions tasks/benchmark/README.md

This file was deleted.

212 changes: 0 additions & 212 deletions tasks/benchmark/run-benchmarks.mts

This file was deleted.

8 changes: 8 additions & 0 deletions tasks/k6-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# K6 Task

## Usage
```
yarn test:k6 [project-directory]
```

You can pass additional command line options if you need specific behaviour. These are documented in the `--help` output of the above command. The source code within `run-k6-tests.mts` will also be helpful in understanding the behaviour.
Loading

0 comments on commit 91270ed

Please sign in to comment.