Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/tests / src / jest / fileTransform.ts
Size: Mime:
/**
 * @fileoverview This is a custom Jest transformer turning file imports into filenames.
 * @see http://facebook.github.io/jest/docs/tutorial-webpack.html
 */
import { basename } from 'path'

/**
 * @todo we can probably use this to uglify stuff
 */
const fileTransform = {
  process(src: string, filename: string) {
    return `module.exports = ${JSON.stringify(basename(filename))};`
  },
}

export { fileTransform }
export default fileTransform
// export = fileTransform