Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(integration): Adds assertion to exemplify wrong path resolution in lock file #4717

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions __tests__/commands/install/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ test('root install with optional deps', (): Promise<void> => runInstall({}, 'roo
test('install file: protocol with relative paths', (): Promise<void> =>
runInstall({}, 'install-file-relative', async config => {
expect(await fs.readFile(path.join(config.cwd, 'node_modules', 'root-a', 'index.js'))).toEqual('foobar;\n');

const lockFileContent = await fs.readFile(path.join(config.cwd, 'yarn.lock'));
const lockFileLines = explodeLockfile(lockFileContent);

expect(lockFileLines[5]).toMatch('"file:../root-a"');
expect(lockFileLines[9]).toMatch('"file:../../root-b"');
}));

test('install file: protocol without force retains installed package', (): Promise<void> =>
Expand Down