-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[issue-2922] Add more information on Nightly page (#2927)
* [issue-2922] Add more information on Nightly page * Correct & fix snapshot * Add test on getVersionAsString()
- Loading branch information
1 parent
0f09759
commit a029dca
Showing
5 changed files
with
83 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { describe, expect, it, vi } from 'vitest' | ||
import { VersionMetaData, getVersionAsString } from '..'; | ||
|
||
|
||
describe('getVersionAsString', () => { | ||
it('getVersionAsString works correctly', async () => { | ||
const vmd: VersionMetaData = { | ||
major: 21, | ||
minor: 0, | ||
security: 4, | ||
pre: 'beta', | ||
patch: 1, | ||
build: 5, | ||
optional: "ea", | ||
adopt_build_number: 9, | ||
openjdk_version: "mock-openjdk_version", | ||
semver: "mock-semver", | ||
}; | ||
|
||
const result = getVersionAsString(vmd, true); | ||
|
||
expect(result).toBe("21.0.4.1-beta+5.9-ea"); | ||
}) | ||
|
||
it('getVersionAsString with allowShortNotation works correctly', async () => { | ||
const vmd: VersionMetaData = { | ||
major: 21, | ||
minor: 0, | ||
security: 0, | ||
pre: undefined, | ||
patch: 0, | ||
build: 0, | ||
optional: undefined, | ||
adopt_build_number: 0, | ||
openjdk_version: "mock-openjdk_version", | ||
semver: "mock-semver", | ||
}; | ||
|
||
const result = getVersionAsString(vmd, true); | ||
|
||
expect(result).toBe("21"); | ||
}) | ||
}); |
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