-
Notifications
You must be signed in to change notification settings - Fork 1k
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
(jest) improves performance and mem use reduction; adds compatibility with 3rd party tools; fwds all args to jest command #4096
(jest) improves performance and mem use reduction; adds compatibility with 3rd party tools; fwds all args to jest command #4096
Conversation
…d into fix/standardize-jest-config * 'fix/standardize-jest-config' of github.com:dac09/redwood: add node-fetch renovate blocklist Update dependency msw to v0.36.4 (redwoodjs#4116) Update dependency @clerk/types to v1.21.0 (redwoodjs#4115) Update dependency @envelop/testing to v3.0.1 (redwoodjs#4113) Update dependency qs to v6.10.3 (redwoodjs#4111) Update dependency @envelop/testing to v3 (redwoodjs#4078) Update typescript-eslint monorepo to v5.9.1 (redwoodjs#4101) Update dependency cypress to v9.2.1 (redwoodjs#4110) Update dependency fast-glob to v3.2.9 (redwoodjs#4075) Update storybook monorepo to v6.4.10 (redwoodjs#4091) Update dependency @apollo/client to v3.5.7 (redwoodjs#4097) add timeout (redwoodjs#4107) Pin dependency webpack-dev-server to 4.7.2 (redwoodjs#4093) Update dependency @envelop/core to v1.7.1 (redwoodjs#4092) Add missing type for `only` in scenario (redwoodjs#4083)
@jtoar can I request you take a look at this too please? We have a few jest PRs in progress, I think this one should go last |
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.
…ize-jest-config * 'main' of github.com:redwoodjs/redwood: (32 commits) Update dependency eslint to v8.7.0 (redwoodjs#4168) remove projects beta automation (redwoodjs#4171) Update dependency core-js to v3.20.3 (redwoodjs#4162) Don't mask GraphQL errors when you're in the dev environment (redwoodjs#4166) Update storybook monorepo to v6.4.13 (redwoodjs#4160) Fix: Run web tests in parallel (redwoodjs#4024) Update Issue and PR templates with v1-rc status (redwoodjs#4155) Update dependency fast-glob to v3.2.11 (redwoodjs#4158) Update dependency @auth0/auth0-spa-js to v1.19.4 (redwoodjs#4153) Update dependency react-hook-form to v7.24.0 (redwoodjs#4149) Update dependency @clerk/clerk-sdk-node to v2.6.1 (redwoodjs#4151) Update prisma monorepo to v3.8.1 (redwoodjs#4152) Update e2e.yaml Update dependency firebase to v9.6.3 (redwoodjs#4148) chore(setup-deploy): refactor setup deploy (redwoodjs#4065) Update dependency mini-css-extract-plugin to v2.4.7 (redwoodjs#4142) test project install autoprefixer@^9.8.8 (redwoodjs#4143) Update dependency @graphql-codegen/typescript-react-apollo to v3.2.4 (redwoodjs#4137) Render all MetaTag tags within a `<Head>` element (redwoodjs#4128) fix: running tests with mysql datasource (redwoodjs#4084) ...
…d into fix/standardize-jest-config * 'fix/standardize-jest-config' of github.com:dac09/redwood: Refactor `rw type-check` (redwoodjs#4086)
Note const config = {
rootDir: '../',
preset: '@redwoodjs/testing/config/jest/api',
}
+ if (process.env.DEBUG?.includes('wallaby')) config.runner = 'jest-runner';
module.exports = config |
…d into fix/standardize-jest-config * 'fix/standardize-jest-config' of github.com:dac09/redwood: Update dependency mini-css-extract-plugin to v2.5.0 (redwoodjs#4156) Update dependency @types/node to v16.11.20 (redwoodjs#4172)
…ize-jest-config * 'main' of github.com:redwoodjs/redwood: (46 commits) update contributing content (redwoodjs#4325) Upgrade yarn to 3.1.1 (redwoodjs#3919) Sort package.jsons (redwoodjs#4309) Update dependency esbuild to v0.14.16 (redwoodjs#4322) Add explanation and docs link in generated tests (redwoodjs#4218) Update dependency webpack to v5.68.0 (redwoodjs#4315) Update dependency esbuild to v0.14.15 (redwoodjs#4321) Update dependency cypress to v9.4.1 (redwoodjs#4319) Update dependency @typescript-eslint/parser to v5.10.2 (redwoodjs#4318) Pin dependencies (redwoodjs#4317) Pull proper keys for Yarn and npm (redwoodjs#4313) Add missing deps to @redwoodjs/forms package.json (redwoodjs#4310) Update dependency @typescript-eslint/eslint-plugin to v5.10.2 (redwoodjs#4314) Tweak release script (redwoodjs#4312) Update dependency @graphql-codegen/typescript-operations to v2.2.3 (redwoodjs#4311) Update dependency vscode-languageserver-textdocument to v1.0.4 (redwoodjs#4308) Update dependency copy-webpack-plugin to v10.2.4 (redwoodjs#4307) Update storybook monorepo to v6.4.17 (redwoodjs#4306) Update release script (redwoodjs#4305) Update dependency msw to v0.36.8 (redwoodjs#4301) ...
…ize-jest-config * 'main' of github.com:redwoodjs/redwood: Update dependency @types/vscode to v1.63.2 (redwoodjs#4332) createCell: Give cell results priority over cell props (redwoodjs#4304) Update dependency node-notifier to v10.0.1 (redwoodjs#4331) Update dependency core-js to v3.21.0 (redwoodjs#4330) Update dependency @clerk/clerk-js to v2.12.1 (redwoodjs#4327) Update dependency @clerk/types to v1.24.1 (redwoodjs#4328) Update dependency supertokens-node to v8.6.0 (redwoodjs#4324) Update prisma monorepo to v3.9.0 (redwoodjs#4329) Update dependency @types/node to v16.11.22 (redwoodjs#4326)
@thedavidprice gone through the checklist
PR created here: https://github.com/redwoodjs/redwoodjs.com/pull/959 Can you please confirm you're happy with the title of the page? I'll update all the links
Will need updating
Added fix for this also. Thanks for scope creep 😉 ✌️
I want to discuss this further, but also don't think we need this in the PR, its already grown too much in scope I think!
Done
I don't think we need a codemod because its backwards compatible. If you're happy with your jest config, then probably no need to change! Blurb: |
Nice, I think this is enough to run wallabyjs on redwood tests, it's my only current codebase which doesn't work with it |
It is! Been my personal mission, also ❤️ wallaby. It does need a little tweak to the config though (see my first comment on this pr) |
…d into fix/standardize-jest-config * 'fix/standardize-jest-config' of github.com:dac09/redwood: Update dependency @types/netlify-identity-widget to v1.9.3 (redwoodjs#4343) Update dependency webpack-dev-server to v4.7.4 (redwoodjs#4337) Update dependency @clerk/clerk-sdk-node to v2.8.0 (redwoodjs#4336) Update dependency esbuild to v0.14.17 (redwoodjs#4333)
PerformanceI did a quick mem before and after check and reported it over here in #4208 Confirming Web seems resolved and API is reduced but about 50%. 🚀 |
Closes #2708
Closes #4017
Closes #3413
Closes #3419
What does this do?
Changes how jest is configured in the following ways:
jest.config.js
to Redwood projects. This is required for other tools (and the jest cli itself) to know what config to load. (See examples section)packages/testing/config/jest/jest.config.js
, as I've moved this code into the presets i.e.packages/testing/config/jest/api/jest-preset.js
andpackages/testing/config/jest/web/jest-preset.js
. We don't need to pass this hidden config file anymoreExamples & Why things are done this way