2018-09-06 20:30:33 +00:00
|
|
|
// @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 = {
|
2018-09-06 20:30:33 +00:00
|
|
|
process(src /*: string */, filename /*: string */) {
|
2018-02-17 21:28:47 +00:00
|
|
|
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
|
|
|
|
},
|
|
|
|
};
|