Skip to content

Commit

Permalink
Adds a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maël Nison committed Jun 26, 2017
1 parent b6169f1 commit 83cfafa
Show file tree
Hide file tree
Showing 21 changed files with 1,385 additions and 0 deletions.
9 changes: 9 additions & 0 deletions __tests__/commands/install/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ test.concurrent('properly find and save build artifacts', async () => {
});
});

test('reading a lockfile should not optimize it', async () => {
await runInstall({}, 'lockfile-optimization', async (config, reporter): Promise<void> => {
const was = await fs.readFile(`${__dirname}/../../fixtures/install/lockfile-optimization/yarn.lock`);
const is = await fs.readFile(`${config.cwd}/yarn.lock`);

expect(is).toEqual(was);
});
});

test('creates the file in the mirror when fetching a git repository', async () => {
await runInstall({}, 'install-git', async (config, reporter): Promise<void> => {
const lockfile = await Lockfile.fromDirectory(config.cwd);
Expand Down
6 changes: 6 additions & 0 deletions __tests__/fixtures/install/lockfile-optimization/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"webpack": "1.14.0",
"webpack-parallel-uglify-plugin": "0.2.0"
}
}
Loading

0 comments on commit 83cfafa

Please sign in to comment.