Skip to content
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

chore: use @swc/jest vs ts-jest #1457

Merged
merged 3 commits into from Nov 14, 2022
Merged

chore: use @swc/jest vs ts-jest #1457

merged 3 commits into from Nov 14, 2022

Conversation

kettanaito
Copy link
Member

Adopts @swc/jest as a replacement for ts-jest. @swc/jest is more performant and doesn't have memory issues that ts-jest has.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 12, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 075053d:

Sandbox Source
MSW React Configuration

@kettanaito
Copy link
Member Author

Cool, so migrating to @swc/jest causes these failing test I began to experience in #1436. That's nice to know.

@@ -3,6 +3,8 @@ import * as path from 'path'
import chalk from 'chalk'
import { until } from '@open-draft/until'

const { cyan } = chalk
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this chalk import usage in #1399.

/**
* @jest-environment node
*/
import https from 'https'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Do not use wild import. Do use allowSyntheticDefaultImport in TypeScript. This makes @swc/jest happy. Otherwise, module patching from the interceptors applies patches to a different export methods than the test gets.

@kettanaito kettanaito merged commit ff54d7a into main Nov 14, 2022
@kettanaito kettanaito deleted the chore/use-swc branch November 14, 2022 16:14
@kettanaito
Copy link
Member Author

Released: v0.48.3 🎉

This has been released in v0.48.3!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant