1 | // @remove-on-eject-begin
|
2 | /**
|
3 | * Copyright (c) 2014-present, Facebook, Inc.
|
4 | *
|
5 | * This source code is licensed under the MIT license found in the
|
6 | * LICENSE file in the root directory of this source tree.
|
7 | */
|
8 | // @remove-on-eject-end
|
9 | ;
|
10 |
|
11 | const path = require('path');
|
12 |
|
13 | // This is a custom Jest transformer turning file imports into filenames.
|
14 | // http://facebook.github.io/jest/docs/en/webpack.html
|
15 |
|
16 | module.exports = {
|
17 | process(src, filename) {
|
18 | return `module.exports = ${JSON.stringify(path.basename(filename))};`;
|
19 | },
|
20 | };
|