test(sw): shared Playwright runtime resolver
This commit is contained in:
1 parent
94c0a13c74
commit
df650c02dd
23 files changed
+120
-55
No files matched your search
@@ -8,13 +8,12 @@
|
||||
// so any difference would be a regression. Pixels are compared with a control shot taken after the CURRENT token
|
||||
// blocks are injected once more (2026-10-20): re-declaring them alone re-rasterizes a few gradient pixels.
|
||||
// Usage: node packages/sw/tests/theme-inheritance.browser.mjs <storybook-url> <out-dir>
|
||||
import { createRequire } from 'node:module'
|
||||
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { runtimeRequire } from './playwright-runtime.mjs'
|
||||
|
||||
const runtime = process.env.SW_RUNTIME_MODULES ?? 'C:/Users/user/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules'
|
||||
const require = createRequire(path.join(runtime, 'index.js'))
|
||||
const require = runtimeRequire()
|
||||
const { chromium } = require('playwright')
|
||||
const { PNG } = require('pngjs')
|
||||
const pixelmatch = require('pixelmatch').default ?? require('pixelmatch')
|
||||
|
||||
Reference in new issue
Block a user