Skip to content

Commit 308f04c

Browse files
authored
ci: ecosystem ci won't test snapshot (#910)
1 parent 90d1104 commit 308f04c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"test": "pnpm run test:unit && pnpm run test:integration && pnpm run test:e2e",
1818
"test:benchmark": "cd ./tests && pnpm run test:benchmark",
1919
"test:e2e": "pnpm run build:examples && cd tests && pnpm run test:e2e",
20+
"test:ecosystem-ci": "pnpm run test:unit && cross-env ECO_CI=1 pnpm run test:integration && pnpm run test:e2e",
2021
"test:integration": "cross-env NODE_OPTIONS='--experimental-vm-modules' vitest run --project integration",
2122
"test:integration:watch": "cross-env NODE_OPTIONS='--experimental-vm-modules' vitest --project integration",
2223
"test:unit": "vitest run --project unit*",

tests/setupVitestTests.ts

+13
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,16 @@ expect.addSnapshotSerializer(
1818
},
1919
}),
2020
);
21+
22+
if (process.env.ECO_CI) {
23+
expect.extend({
24+
toMatchSnapshot: () => ({
25+
pass: true,
26+
message: () => 'Snapshot always passes',
27+
}),
28+
toMatchInlineSnapshot: () => ({
29+
pass: true,
30+
message: () => 'Snapshot always passes',
31+
}),
32+
});
33+
}

0 commit comments

Comments
 (0)