Skip to content

Commit

Permalink
[LOCAL] remove too strict version controls
Browse files Browse the repository at this point in the history
  • Loading branch information
kelset committed Feb 1, 2023
1 parent 0b440d5 commit 712efaf
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions scripts/__tests__/version-utils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,6 @@ describe('version-utils', () => {
expect(prerelease).toBe('rc.4');
});

it('should reject pre-release version with patch != 0', () => {
function testInvalidVersion() {
parseVersion('0.66.3-rc.4', 'release');
}
expect(testInvalidVersion).toThrowErrorMatchingInlineSnapshot(
`"Version 0.66.3-rc.4 is not valid for Release"`,
);
});

it('should reject pre-release version from tag with random prerelease pattern', () => {
function testInvalidVersion() {
parseVersion('v0.66.0-something_invalid', 'release');
Expand Down Expand Up @@ -228,15 +219,6 @@ describe('version-utils', () => {
expect(prerelease).toBe('rc.0');
});

it('should reject dryrun with prerelease . version with patch different from 0', () => {
function testInvalidFunction() {
parseVersion('0.20.3-rc.0', 'dry-run');
}
expect(testInvalidFunction).toThrowErrorMatchingInlineSnapshot(
`"Version 0.20.3-rc.0 is not valid for dry-runs"`,
);
});

it('should parse dryrun with prerelease - version', () => {
const {version, major, minor, patch, prerelease} = parseVersion(
'0.20.0-rc-0',
Expand All @@ -249,15 +231,6 @@ describe('version-utils', () => {
expect(prerelease).toBe('rc-0');
});

it('should reject dryrun with prerelease - version with patch different from 0', () => {
function testInvalidFunction() {
parseVersion('0.20.3-rc-0', 'dry-run');
}
expect(testInvalidFunction).toThrowErrorMatchingInlineSnapshot(
`"Version 0.20.3-rc-0 is not valid for dry-runs"`,
);
});

it('should parse dryrun with main version', () => {
const {version, major, minor, patch, prerelease} = parseVersion(
'1000.0.0',
Expand Down

0 comments on commit 712efaf

Please sign in to comment.