Skip to content

Commit 07afa56

Browse files
jackbreweraitchiss
andauthored
chore(tests): Add initial full-journey tests (#569)
* Initial local implementation * debug info * Add message in postDeploy when running onSuccess * bump version * logging * Split onPostBuild/onSuccess functionality * Update .gitignore * Tidier logging * tweak results logging format * bump version * Make logged scores human-readable * Tidying, code deduplication, rework onSuccess triggering method * bump version * await! * fix console log * Add debugging * small tweaks * Avoid using onSuccess as function name, tidy some logging * bump version * Be more explicit with event type * bump version * Bump version * Debugging * Get arguments from correct place 😅 * Simplify logs * Remove duplication * Revert temporary version * Revert temporary version * Rename file, remove obsolete DEBUG_COLORS code * Add tests to ensure correct event is returned when using RUN_ON_SUCCESS env var * Add console output when using custom Lighthouse settings * Remove colors from `summary` text used in App UI * First round of e2e tests * Add settings info to the message shown as each run starts * Move expected output closer to tests, split across multiple tests, one scenario per file * Remove debug code * revert formatting * Add DEPLOY_URL variable for onSuccess tests * tweaks after update from main * fix style lint issue --------- Co-authored-by: Suzanne Aitchison <[email protected]>
1 parent b2084a8 commit 07afa56

25 files changed

+10439
-23
lines changed

package-lock.json

Lines changed: 181 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"local-onsuccess": "LIGHTHOUSE_RUN_ON_SUCCESS=true node -e 'import(\"./src/index.js\").then(index => index.default()).then(events => events.onSuccess());'",
99
"lint": "eslint 'src/**/*.js'",
1010
"format": "prettier --write 'src/**/*.js'",
11-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --collect-coverage",
11+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --collect-coverage --maxWorkers=1",
1212
"format:ci": "prettier --check 'src/**/*.js'"
1313
},
1414
"keywords": [
@@ -53,7 +53,8 @@
5353
"husky": "^8.0.1",
5454
"jest": "^29.0.0",
5555
"netlify-plugin-cypress": "^2.2.1",
56-
"prettier": "^2.0.0"
56+
"prettier": "^2.0.0",
57+
"strip-ansi": "^7.0.1"
5758
},
5859
"husky": {
5960
"hooks": {

0 commit comments

Comments
 (0)