Skip to content

Commit 37c3bce

Browse files
committed
Show diff of failing integration tests
1 parent e4b480a commit 37c3bce

3 files changed

Lines changed: 41 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"yargs": "^17.7.2"
4343
},
4444
"devDependencies": {
45+
"compare-fixture": "^1.1.0",
4546
"coveralls": "^3.1.1",
4647
"eslint": "^8.22.0",
4748
"eslint-config-prettier": "^8.5.0",

pnpm-lock.yaml

Lines changed: 38 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/run-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ const execOpts = { cwd: inputDir, stderr: 'inherit' };
4545
console.log('comparing results');
4646

4747
try {
48-
await execa('diff', ['-rq', './app', '../output/app'], execOpts);
48+
const compareFixture = await import('compare-fixture');
49+
compareFixture.default(path.join(inputDir, 'app'), path.join(inputDir, '../output/app'));
4950
} catch (e) {
5051
console.error('codemod did not run successfully');
5152
console.log(e);

0 commit comments

Comments
 (0)