Skip to content

Commit

Permalink
chore: try to normalize echo between OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Jan 7, 2020
1 parent 8df73bc commit 927475f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
12 changes: 0 additions & 12 deletions packages/auto-install/test/snapshots/yarn-bare.js.md

This file was deleted.

Binary file removed packages/auto-install/test/snapshots/yarn-bare.js.snap
Binary file not shown.
12 changes: 0 additions & 12 deletions packages/auto-install/test/snapshots/yarn.js.md

This file was deleted.

Binary file removed packages/auto-install/test/snapshots/yarn.js.snap
Binary file not shown.
5 changes: 3 additions & 2 deletions packages/auto-install/test/yarn-bare.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ test('yarn, bare', async (t) => {
},
plugins: [
// mock the call to yarn here. yarn has had consistent issues in this test env
autoInstall({ manager: 'yarn', commands: { yarn: 'echo "yarn.bare" > yarn.lock' } }),
autoInstall({ manager: 'yarn', commands: { yarn: 'echo yarn.bare > yarn.lock' } }),
resolve()
]
});
const lockFile = readFileSync('yarn.lock', 'utf-8');
t.snapshot(lockFile.replace(/\r\n/g, '\n'));
// snapshots for this are a nightmare cross-platform
t.truthy(/yarn\.bare\s+node-noop/.test(lockFile));
});

test.after(async () => {
Expand Down
5 changes: 3 additions & 2 deletions packages/auto-install/test/yarn.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ test('yarn', async (t) => {
format: 'cjs'
},
// mock the call to yarn here. yarn has had consistent issues in this test env
plugins: [autoInstall({ commands: { yarn: 'echo "yarn" > yarn.lock' } }), resolve()]
plugins: [autoInstall({ commands: { yarn: 'echo yarn > yarn.lock' } }), resolve()]
});
const lockFile = readFileSync('yarn.lock', 'utf-8');
t.snapshot(lockFile.replace(/\r\n/g, '\n'));
// snapshots for this are a nightmare cross-platform
t.truthy(/yarn\s+node-noop/.test(lockFile));
});

test.after(async () => {
Expand Down

0 comments on commit 927475f

Please sign in to comment.