mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
18 lines
391 B
JavaScript
18 lines
391 B
JavaScript
import * as fs from 'node:fs'
|
|
import { EdgeRuntime } from 'edge-runtime'
|
|
|
|
const script = fs.readFileSync('./tap/run-edge-runtime.js', { encoding: 'utf-8' })
|
|
|
|
const runtime = new EdgeRuntime()
|
|
runtime.evaluate(script)
|
|
|
|
let stats
|
|
do {
|
|
await new Promise((resolve) => setTimeout(resolve, 1000))
|
|
;({ stats } = runtime.context)
|
|
} while (!stats)
|
|
|
|
if (stats?.failed !== 0) {
|
|
process.exit(1)
|
|
}
|