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