Comments (6)
Was this related to https://swc.rs/blog/2021/04/20/swc-1.2.54#sourcemaps-1581?
from swc-node.
@JSanchezIO I can not reproduce in #367, could you please provide your jest config?
from swc-node.
It's working locally for me now.
from swc-node.
Just for awareness, this was the jest config:
module.exports = {
setupFilesAfterEnv: ['./jest.setup.ts'],
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['<rootDir>/e2e/', '/node_modules/', '/.stryker-tmp/'],
transform: {
'^.+\\.(t|j)sx?$': ['@swc-node/jest'],
},
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
};
from swc-node.
Hey there, using latest Jest and latest swc-node, I am still experiencing this issue.
tsconfig.json
{
"extends": "@tsconfig/node12/tsconfig.json",
"include": ["src", "next"],
"exclude": ["node_modules", "./**/dist"],
"compilerOptions": {
"paths": {
"iron-session": ["./src/index.ts"],
"iron-session/next": ["./next/index.ts"]
},
"sourceMap": true
}
}
package.json
{
"jest": {
"transform": {
"^.+\\.(t|j)sx?$": [
"@swc-node/jest"
]
}
}
}
index.test.ts
test("it throws when calling save() and headers were already sent", async () => {
const session = await getIronSession(
{
headers: {},
} as IncomingMessage,
{
headersSent: true,
} as unknown as ServerResponse,
{ password, cookieName },
);
await expect(session.save()).rejects.toThrowErrorMatchingInlineSnapshot(``);
});
> npx jest -u
FAIL src/index.test.ts
● Test suite failed to run
Jest: Couldn't locate all inline snapshots.
at traverseAst (node_modules/jest-snapshot/build/InlineSnapshots.js:377:11)
at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
> npm view jest version
27.3.1
from swc-node.
Also experiencing this issue on "jest": "27.3.1",
and "@swc/jest": "0.2.5",
from swc-node.
Related Issues (20)
- [request] Consider adding an option to ignore `files` / `includes` property of tsconfig HOT 1
- Targets don't align with SWC documentation
- Supporting webpack <= 4 for @swc-node/swc-loader
- Mystery file reported in coverage report using @swc-node/jest with v8 coveargeProvider
- Register does not support node16: Argument for '--moduleResolution' option must be 'node', 'classic'
- `ERR_INVALID_URL_SCHEME`: `data:text/javascript,` is not supported like `ts-node`
- Cannot find module '@node-rs/xxhash-linux-x64-gnu' HOT 3
- @swc-node/register: Error: Cannot find module '@swc/core' HOT 1
- Doesn't Work with Ava Out of the Box
- Documentation missing on how to setup vscode debugger HOT 2
- Sometimes namespace import has unexpected behavior HOT 1
- How to run via npx HOT 1
- jest silently ignores compilation error w/swc HOT 1
- Problem with sourcemaps
- @swc-node/jest needs install @swc/helpers ? HOT 4
- Mocha tests for React (jsx) aren't parsed as jsx if test filename has .js extension HOT 2
- @swc-node/register v1.5.6 breaking module aliases transpilation where in v1.5.4 works great HOT 2
- avoid tsconfig.json (parseJsonConfigFileContent) and use .swcrc HOT 2
- Confusing or incorrect jest test coverage
- @swc-node/[email protected] - Cannot use import statement outside a module HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swc-node.