Skip to content

Commit

Permalink
feature: test: do not fail when update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed May 22, 2024
1 parent eacbe15 commit 447e85f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ const compile = ({dir, parser}) => (t) => (name) => {

const result = fixEmpty(print(ast));

if (UPDATE === '1')
if (UPDATE === '1') {
writeFileSync(to, result);
return t.pass('update fixture');
}

return t.equal(result, toData);
};
Expand Down

0 comments on commit 447e85f

Please sign in to comment.