forked from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using commit messages instead of PR labels
- Loading branch information
1 parent
8460a0f
commit 551739e
Showing
7 changed files
with
45 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
import {increment} from '../src/versionBuilder' | ||
|
||
test('increment minor version', () => { | ||
const nextVersion = increment('1.0.0', '', ['minor']) | ||
const nextVersion = increment('1.0.0', '', ['#minor'], 'patch') | ||
console.log(nextVersion.version) | ||
expect(nextVersion.version).toEqual('1.1.0') | ||
}) | ||
|
||
test('increment major version', () => { | ||
const nextVersion = increment('1.0.0', '', ['major']) | ||
const nextVersion = increment('1.0.0', '', ['#major'], 'patch') | ||
console.log(nextVersion.version) | ||
expect(nextVersion.version).toEqual('2.0.0') | ||
}) | ||
|
||
test('increment patch version', () => { | ||
const nextVersion = increment('1.0.0', '', ['patch']) | ||
const nextVersion = increment('1.0.0', '', ['#patch'], 'patch') | ||
console.log(nextVersion.version) | ||
expect(nextVersion.version).toEqual('1.0.1') | ||
}) | ||
|
||
test('increment pre patch version', () => { | ||
const nextVersion = increment('1.0.0', 'beta', ['prepatch']) | ||
const nextVersion = increment( | ||
'1.0.0', | ||
'beta', | ||
['this is test #prepatch version'], | ||
'patch' | ||
) | ||
console.log(nextVersion.version) | ||
expect(nextVersion.version).toEqual('1.0.1-beta.0') | ||
}) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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