github.com/shyftnetwork/go-empyrean@v1.8.3-0.20191127201940-fbfca9338f04/shyftBlockExplorerUI/config/jest/fileTransform.js (about)

     1  'use strict';
     2  
     3  const path = require('path');
     4  
     5  // This is a custom Jest transformer turning file imports into filenames.
     6  // http://facebook.github.io/jest/docs/en/webpack.html
     7  
     8  module.exports = {
     9    process(src, filename) {
    10      return `module.exports = ${JSON.stringify(path.basename(filename))};`;
    11    },
    12  };