2017-11-26 05:19:55 +00:00
|
|
|
"use strict"
|
2017-03-26 06:53:54 +00:00
|
|
|
|
2017-11-26 05:19:55 +00:00
|
|
|
const path = require("path")
|
2017-03-26 06:53:54 +00:00
|
|
|
|
|
|
|
// This is a custom Jest transformer turning file imports into filenames.
|
|
|
|
// http://facebook.github.io/jest/docs/tutorial-webpack.html
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
process(src, filename) {
|
2017-11-26 05:19:55 +00:00
|
|
|
return "module.exports = " + JSON.stringify(path.basename(filename)) + ";"
|
|
|
|
}
|
|
|
|
}
|