mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 02:48:42 +08:00
16 lines
333 B
JavaScript
16 lines
333 B
JavaScript
"use strict";
|
|
|
|
const path = require("path");
|
|
const fs = require("fs");
|
|
const crypto = require("crypto");
|
|
|
|
// This is a custom Jest transformer that returns the content of a file
|
|
|
|
module.exports = {
|
|
process(src, filename) {
|
|
return `module.exports = ${JSON.stringify(
|
|
fs.readFileSync(filename).toString()
|
|
)};`;
|
|
},
|
|
};
|