Skip to content

Commit 02504b9

Browse files
committed
test(napi/parser): disable raw transfer tests by default (#12742)
See: #12435 (comment) Disable raw transfer tests by default. To run them locally, use `RUN_RAW_TESTS` env: ```sh RUN_RAW_TESTS=true pnpm test ``` Raw transfer tests are still enabled in CI.
1 parent cd93174 commit 02504b9

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ jobs:
170170
if: steps.filter.outputs.src == 'true'
171171
- if: steps.filter.outputs.src == 'true'
172172
name: Run tests in workspace
173+
env:
174+
RUN_RAW_TESTS: "true"
173175
run: |
174176
rustup target add wasm32-wasip1-threads
175177
pnpm run build-test

napi/parser/vitest.config.mts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import { defineConfig } from 'vitest/config';
22

3-
const RUN_LAZY_TESTS = process.env.RUN_LAZY_TESTS === 'true';
3+
const { env } = process;
4+
let exclude;
5+
if (env.RUN_LAZY_TESTS !== 'true') {
6+
exclude = ['lazy-deserialization.test.ts'];
7+
if (env.RUN_RAW_TESTS !== 'true') exclude.push('parse-raw.test.ts');
8+
}
49

510
export default defineConfig({
611
test: {
712
diff: {
813
expand: false,
914
},
10-
...(
11-
!RUN_LAZY_TESTS &&
12-
{ exclude: ['lazy-deserialization.test.ts'] }
13-
),
15+
exclude,
1416
},
1517
plugins: [
1618
// Enable Codspeed plugin in CI only

0 commit comments

Comments
 (0)