File tree Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -186,14 +186,7 @@ jobs:
186
186
script : |
187
187
core.setFailed('dist cache hit failed')
188
188
- name : Run Test Suite
189
- run : npm run tap:edge-runtime | tee edge-runtime.tap
190
- - id : parse
191
- uses : Coderlane/tap-action@d5de2302c571f90ccb2d2e9416eaca4efe3185dd
192
- - if : ${{ steps.parse.outputs.tap_fail != '0' }}
193
- uses : actions/github-script@v6
194
- with :
195
- script : |
196
- core.setFailed('npm run tap:edge-runtime failed')
189
+ run : npm run tap:edge-runtime
197
190
198
191
browsers :
199
192
needs :
Original file line number Diff line number Diff line change
1
+ import * as fs from 'node:fs'
2
+ import { EdgeRuntime } from 'edge-runtime'
3
+
4
+ const script = fs . readFileSync ( './tap/run-edge-runtime.js' , { encoding : 'utf-8' } )
5
+
6
+ const runtime = new EdgeRuntime ( )
7
+ runtime . evaluate ( script )
8
+
9
+ let stats
10
+ do {
11
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) )
12
+ ; ( { stats } = runtime . context )
13
+ } while ( ! stats )
14
+
15
+ if ( stats ?. failed !== 0 ) {
16
+ process . exit ( 1 )
17
+ }
Original file line number Diff line number Diff line change 1
1
./node_modules/.bin/esbuild --format=esm --bundle --target=esnext tap/run-edge-runtime.ts > tap/run-edge-runtime.js
2
- ./node_modules/.bin/edge-runtime tap/run- edge-runtime.js
2
+ node tap/. edge-runtime.mjs
Original file line number Diff line number Diff line change 1
1
import QUnit from 'qunit'
2
2
import run from './run.js'
3
3
4
- run ( QUnit )
4
+ run ( QUnit , ( stats ) => {
5
+ // @ts -ignore
6
+ globalThis . stats = stats
7
+ } )
You can’t perform that action at this time.
0 commit comments