You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
soapbox/jest/assetTransformer.js

11 lines
341 B

const path = require('path');
// Custom Jest asset transformer
// https://jestjs.io/docs/code-transformation#writing-custom-transformers
// Tries to do basically what Webpack does
module.exports = {
process(src, filename, config, options) {
return `module.exports = "https://soapbox.test/assets/${path.basename(filename)}";`;
},
};