2018-05-08 03:02:19 +00:00
|
|
|
// @no-flow
|
2018-02-18 16:13:29 +00:00
|
|
|
const path = require("path");
|
2018-02-17 21:28:47 +00:00
|
|
|
|
|
|
|
// This is a custom Jest transformer turning file imports into filenames.
|
|
|
|
// http://facebook.github.io/jest/docs/en/webpack.html
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
process(src, filename) {
|
|
|
|
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
|
|
|
|
},
|
|
|
|
};
|