mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-05 02:27:45 +00:00
15 lines
377 B
JavaScript
15 lines
377 B
JavaScript
'use strict'
|
|
|
|
const path = require('node:path')
|
|
|
|
const runnerPath = path.join(__dirname, 'runner').replace(/\\/g, '/')
|
|
|
|
require.extensions['.scss'] = (module, filename) => {
|
|
const normalizedFilename = filename.replace(/\\/g, '/')
|
|
|
|
return module._compile(`
|
|
const runner = require('${runnerPath}')
|
|
runner('${normalizedFilename}', { describe, it })
|
|
`, filename)
|
|
}
|