mirror of
https://github.com/actions/setup-java.git
synced 2025-08-24 06:15:06 +00:00
format
This commit is contained in:
parent
e987e880f9
commit
ec5db35500
@ -191,7 +191,9 @@ describe('getAvailableVersions', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: string) => {
|
async (osArch: string, distroArch: string) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
|
|
||||||
const installerOptions: JavaInstallerOptions = {
|
const installerOptions: JavaInstallerOptions = {
|
||||||
version: '17',
|
version: '17',
|
||||||
|
@ -208,7 +208,9 @@ describe('getAvailableVersions', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: string) => {
|
async (osArch: string, distroArch: string) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
|
|
||||||
const distribution = new CorrettoDistribution({
|
const distribution = new CorrettoDistribution({
|
||||||
version: '17',
|
version: '17',
|
||||||
|
@ -103,7 +103,9 @@ describe('findPackageForDownload', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArchs: string[]) => {
|
async (osArch: string, distroArchs: string[]) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
|
|
||||||
const distribution = new GraalVMDistribution({
|
const distribution = new GraalVMDistribution({
|
||||||
version: '21',
|
version: '21',
|
||||||
@ -119,8 +121,9 @@ describe('findPackageForDownload', () => {
|
|||||||
const archiveType = getDownloadArchiveExtension();
|
const archiveType = getDownloadArchiveExtension();
|
||||||
const result = await distribution['findPackageForDownload']('21');
|
const result = await distribution['findPackageForDownload']('21');
|
||||||
|
|
||||||
const expectedUrls = distroArchs.map(distroArch =>
|
const expectedUrls = distroArchs.map(
|
||||||
`https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_${osType}-${distroArch}_bin.${archiveType}`
|
distroArch =>
|
||||||
|
`https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_${osType}-${distroArch}_bin.${archiveType}`
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(expectedUrls).toContain(result.url);
|
expect(expectedUrls).toContain(result.url);
|
||||||
|
@ -105,7 +105,9 @@ describe('getAvailableVersions', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: DistroArch) => {
|
async (osArch: string, distroArch: DistroArch) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
|
|
||||||
const distributions = new LibericaDistributions({
|
const distributions = new LibericaDistributions({
|
||||||
version: '17',
|
version: '17',
|
||||||
|
@ -105,7 +105,9 @@ describe('getAvailableVersions', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: DistroArch) => {
|
async (osArch: string, distroArch: DistroArch) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
|
|
||||||
const distribution = new LibericaDistributions({
|
const distribution = new LibericaDistributions({
|
||||||
version: '17',
|
version: '17',
|
||||||
|
@ -105,7 +105,9 @@ describe('getAvailableVersions', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: DistroArch) => {
|
async (osArch: string, distroArch: DistroArch) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
|
|
||||||
const distribution = new LibericaDistributions({
|
const distribution = new LibericaDistributions({
|
||||||
version: '17',
|
version: '17',
|
||||||
|
@ -95,7 +95,9 @@ describe('findPackageForDownload', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: string) => {
|
async (osArch: string, distroArch: string) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
jest.spyOn(os, 'platform').mockReturnValue('darwin');
|
jest.spyOn(os, 'platform').mockReturnValue('darwin');
|
||||||
|
|
||||||
const version = '17';
|
const version = '17';
|
||||||
@ -119,7 +121,9 @@ describe('findPackageForDownload', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: string) => {
|
async (osArch: string, distroArch: string) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
jest.spyOn(os, 'platform').mockReturnValue('linux');
|
jest.spyOn(os, 'platform').mockReturnValue('linux');
|
||||||
|
|
||||||
const version = '17';
|
const version = '17';
|
||||||
@ -143,7 +147,9 @@ describe('findPackageForDownload', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: string) => {
|
async (osArch: string, distroArch: string) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
jest.spyOn(os, 'platform').mockReturnValue('win32');
|
jest.spyOn(os, 'platform').mockReturnValue('win32');
|
||||||
|
|
||||||
const version = '17';
|
const version = '17';
|
||||||
|
@ -95,7 +95,9 @@ describe('findPackageForDownload', () => {
|
|||||||
])(
|
])(
|
||||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||||
async (osArch: string, distroArch: string) => {
|
async (osArch: string, distroArch: string) => {
|
||||||
jest.spyOn(os, 'arch').mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
jest
|
||||||
|
.spyOn(os, 'arch')
|
||||||
|
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
|
||||||
jest.spyOn(os, 'platform').mockReturnValue('linux');
|
jest.spyOn(os, 'platform').mockReturnValue('linux');
|
||||||
|
|
||||||
const version = '18';
|
const version = '18';
|
||||||
|
Loading…
Reference in New Issue
Block a user