-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix failing tests with cross-env #639
Conversation
b1e7462
to
81c0c13
Compare
package.json
Outdated
"unit:templates-without-ts-esm": "tap \"templates/app/**/*.test.js\" \"templates/app-esm/**/*.test.js\" \"templates/app-ts/**/*.test.ts\" --no-coverage --timeout 200", | ||
"unit:template-ts-esm": " cross-env TS_NODE_PROJECT=./templates/app-ts-esm/tsconfig.json tap templates/app-ts-esm/test/**/*.test.ts --no-coverage --node-arg=--loader=ts-node/esm --timeout 100 --color -R specy", | ||
"unit:cli": "tap \"test/**/*.test.{js,ts}\" --no-coverage --jobs=1 --timeout 400 --color -R specy", | ||
"unit:templates-without-ts-esm": "tap \"templates/app/**/*.test.js\" \"templates/app-esm/**/*.test.js\" \"templates/app-ts/**/*.test.ts\" --no-coverage --timeout 200 --color -R specy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the test output in CI much more readable and useful.
package.json
Outdated
"unit:template-ts-esm": "TS_NODE_PROJECT=./templates/app-ts-esm/tsconfig.json tap templates/app-ts-esm/test/**/*.test.ts --no-coverage --node-arg=--loader=ts-node/esm --timeout 100", | ||
"unit:cli": "tap \"test/**/*.test.{js,ts}\" --no-coverage --timeout 200", | ||
"unit:templates-without-ts-esm": "tap \"templates/app/**/*.test.js\" \"templates/app-esm/**/*.test.js\" \"templates/app-ts/**/*.test.ts\" --no-coverage --timeout 200", | ||
"unit:template-ts-esm": " cross-env TS_NODE_PROJECT=./templates/app-ts-esm/tsconfig.json tap templates/app-ts-esm/test/**/*.test.ts --no-coverage --node-arg=--loader=ts-node/esm --timeout 100 --color -R specy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests were failing when an ENV var went into the test cycle, which doesn't work on windows.
@@ -556,7 +556,7 @@ test('should start the server listening on 0.0.0.0 when running in kubernetes', | |||
t.pass('server closed') | |||
}) | |||
|
|||
test('should start the server with watch options that the child process restart when directory changed', { skip: process.platform === 'win32' }, async (t) => { | |||
test('should start the server with watch options that the child process restart when directory changed', { skip: process.platform === 'win32' || (process.platform === 'darwin' && ['v20', 'v19', 'v18'].some(v => process.version.startsWith(v))) }, async (t) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We skip this on windows. Can we skip on macos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go ahead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not to tbh, but I don't have good arguments for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll spend some time to try and debug. I don't understand what causes failure here tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Ill revisit the skipped tests. My impression is that they are tightly coupled to platform/runtime assumptions and maybe its fair to skip where those assumptions differ. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify-cli](https://github.com/fastify/fastify-cli) | [`5.7.1` -> `5.8.0`](https://renovatebot.com/diffs/npm/fastify-cli/5.7.1/5.8.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/fastify-cli/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify-cli/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify-cli/5.7.1/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify-cli/5.7.1/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify-cli (fastify-cli)</summary> ### [`v5.8.0`](https://github.com/fastify/fastify-cli/releases/tag/v5.8.0) [Compare Source](https://github.com/fastify/fastify-cli/compare/v5.7.1...v5.8.0) ##### What's Changed - fix: Correct wrong instructions for typescript ejecting by [@​anyonecancode](https://github.com/anyonecancode) in [https://github.com/fastify/fastify-cli/pull/589](https://github.com/fastify/fastify-cli/pull/589) - Improve the Typescript template. by [@​meotimdihia](https://github.com/meotimdihia) in [https://github.com/fastify/fastify-cli/pull/592](https://github.com/fastify/fastify-cli/pull/592) - chore(.gitignore): add bun lockfile by [@​Fdawgs](https://github.com/Fdawgs) in [https://github.com/fastify/fastify-cli/pull/594](https://github.com/fastify/fastify-cli/pull/594) - feat: add support for typescript and esm generation ([#​577](https://github.com/fastify/fastify-cli/issues/577)) by [@​S-Abhishek](https://github.com/S-Abhishek) in [https://github.com/fastify/fastify-cli/pull/585](https://github.com/fastify/fastify-cli/pull/585) - fix: use dot notation by [@​is2ei](https://github.com/is2ei) in [https://github.com/fastify/fastify-cli/pull/634](https://github.com/fastify/fastify-cli/pull/634) - Fix failing tests with cross-env by [@​bcomnes](https://github.com/bcomnes) in [https://github.com/fastify/fastify-cli/pull/639](https://github.com/fastify/fastify-cli/pull/639) - print-routes options and print-plugins by [@​bcomnes](https://github.com/bcomnes) in [https://github.com/fastify/fastify-cli/pull/637](https://github.com/fastify/fastify-cli/pull/637) - chore(deps): bump pino-pretty from 9.4.1 to 10.1.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/fastify/fastify-cli/pull/645](https://github.com/fastify/fastify-cli/pull/645) - chore(deps-dev): bump [@​types/node](https://github.com/types/node) from 18.17.0 to 20.4.4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/fastify/fastify-cli/pull/646](https://github.com/fastify/fastify-cli/pull/646) - fix error on undefined plugin by [@​dancastillo](https://github.com/dancastillo) in [https://github.com/fastify/fastify-cli/pull/649](https://github.com/fastify/fastify-cli/pull/649) ##### New Contributors - [@​anyonecancode](https://github.com/anyonecancode) made their first contribution in [https://github.com/fastify/fastify-cli/pull/589](https://github.com/fastify/fastify-cli/pull/589) - [@​S-Abhishek](https://github.com/S-Abhishek) made their first contribution in [https://github.com/fastify/fastify-cli/pull/585](https://github.com/fastify/fastify-cli/pull/585) - [@​is2ei](https://github.com/is2ei) made their first contribution in [https://github.com/fastify/fastify-cli/pull/634](https://github.com/fastify/fastify-cli/pull/634) - [@​dancastillo](https://github.com/dancastillo) made their first contribution in [https://github.com/fastify/fastify-cli/pull/649](https://github.com/fastify/fastify-cli/pull/649) **Full Changelog**: fastify/fastify-cli@v5.7.1...v5.8.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on friday,before 9am on monday,every weekend" in timezone Europe/Paris, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/specfy/specfy). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6ImNob3JlL3Jlbm92YXRlQmFzZUJyYW5jaCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Trying to fix CI