UNPKG
ecology9-src4js-tools
Version:
latest (1.0.1)
1.0.1
1.0.0
src4js-tools
ecology9-src4js-tools
/
KB9001909
/
src4js-pctool-v1
/
config
/
jest
/
fileTransform.js
13 lines
(9 loc)
•
305 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict'
;
const
path =
require
(
'path'
);
// 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))}
;`
; }, };