-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(fix-mismatches): clarify behaviour with non-semver mismatches
- Loading branch information
1 parent
640cb7f
commit 4fd1d0a
Showing
2 changed files
with
29 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,14 +34,16 @@ describe('fixMismatches', () => { | |
expect(wrappers).toMatchSnapshot(); | ||
}); | ||
}); | ||
}); | ||
|
||
it('ignores non-semver dependencies', () => { | ||
const wrappers = [ | ||
mock.wrapper('a', ['foo@link:vendor/foo-0.1.0']), | ||
mock.wrapper('b', ['foo@link:vendor/foo-0.2.0']), | ||
]; | ||
fixMismatches(wrappers, DEFAULT_CONFIG); | ||
expect(wrappers).toMatchSnapshot(); | ||
it('replaces non-semver dependencies with valid semver dependencies', () => { | ||
const wrappers = [ | ||
mock.wrapper('a', ['foo@link:vendor/foo-0.1.0']), | ||
mock.wrapper('b', ['foo@link:vendor/foo-0.2.0']), | ||
mock.wrapper('c', ['[email protected]']), | ||
mock.wrapper('d', ['[email protected]']), | ||
]; | ||
fixMismatches(wrappers, DEFAULT_CONFIG); | ||
expect(wrappers).toMatchSnapshot(); | ||
}); | ||
}); | ||
}); |