diff options
Diffstat (limited to 'pyblackbird_cc/static/scss/tests/sass-true/register.js')
-rw-r--r-- | pyblackbird_cc/static/scss/tests/sass-true/register.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pyblackbird_cc/static/scss/tests/sass-true/register.js b/pyblackbird_cc/static/scss/tests/sass-true/register.js new file mode 100644 index 0000000..d93e414 --- /dev/null +++ b/pyblackbird_cc/static/scss/tests/sass-true/register.js @@ -0,0 +1,14 @@ +'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) +} |