UNPKG

@storybook/test-runner

Version:
18 lines (14 loc) 394 B
const { transformSync: swcTransform } = require('@swc/core'); const { transformPlaywright } = require('../dist'); module.exports = { process(src, filename) { const csfTest = transformPlaywright(src, filename); const result = swcTransform(csfTest, { filename, module: { type: 'commonjs', }, }); return { code: result ? result.code : src }; }, };