(inputPath, outputPath)
| 7 | const { file } = require('chai-files'); |
| 8 | |
| 9 | function checkFile(inputPath, outputPath) { |
| 10 | if (process.env.WRITE_FIXTURES) { |
| 11 | let content = fs.readFileSync(inputPath, { encoding: 'utf-8' }); |
| 12 | |
| 13 | fs.mkdirSync(path.dirname(outputPath), { recursive: true }); |
| 14 | fs.writeFileSync(outputPath, content, { encoding: 'utf-8' }); |
| 15 | } |
| 16 | |
| 17 | expect(file(inputPath)).to.equal(file(outputPath)); |
| 18 | } |
| 19 | |
| 20 | module.exports = { |
| 21 | checkFile, |
no outgoing calls
no test coverage detected
searching dependent graphs…