mirror of https://github.com/aminya/setup-cpp
test: mark the skipped tests in jest
This commit is contained in:
parent
b10559687a
commit
aa96482204
|
@ -3,6 +3,7 @@
|
|||
"ignorePatterns": ["dist/", "node_modules/", "dev/cpp_vcpkg_project"],
|
||||
"rules": {
|
||||
"no-unused-vars": "off",
|
||||
"no-empty-function": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
|
|
|
@ -3,10 +3,11 @@ import { testBin } from "../../utils/tests/test-helpers"
|
|||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-brew", () => {
|
||||
if (process.platform === "win32") {
|
||||
it.skip("should setup brew", () => {})
|
||||
return
|
||||
}
|
||||
it("should setup brew", async () => {
|
||||
if (process.platform !== "darwin") {
|
||||
return
|
||||
}
|
||||
const installInfo = await setupBrew("", "", process.arch)
|
||||
await testBin("brew", ["--version"], installInfo?.binDir)
|
||||
})
|
||||
|
|
|
@ -4,10 +4,11 @@ import { setupChocolatey } from "../chocolatey"
|
|||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-chocolatey", () => {
|
||||
if (process.platform !== "win32") {
|
||||
it.skip("should setup chocolatey", () => {})
|
||||
return
|
||||
}
|
||||
it("should setup chocolatey", async () => {
|
||||
if (process.platform !== "win32") {
|
||||
return
|
||||
}
|
||||
const { binDir } = (await setupChocolatey("", "", process.arch)) as InstallationInfo
|
||||
await testBin("choco", ["--version"], binDir)
|
||||
})
|
||||
|
|
|
@ -2,12 +2,14 @@ import { setupMacOSSDK } from "../macos-sdk"
|
|||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-macos-sdk", () => {
|
||||
if (process.platform !== "darwin") {
|
||||
it.skip("should setup macos-sdk", () => {})
|
||||
return
|
||||
}
|
||||
it("should setup macos-sdk", async () => {
|
||||
if (process.platform === "darwin") {
|
||||
process.env.SDKROOT = undefined
|
||||
await setupMacOSSDK()
|
||||
expect(process.env.SDKROOT).toBeTruthy()
|
||||
expect(typeof process.env.SDKROOT).toBe("string")
|
||||
}
|
||||
process.env.SDKROOT = undefined
|
||||
await setupMacOSSDK()
|
||||
expect(process.env.SDKROOT).toBeTruthy()
|
||||
expect(typeof process.env.SDKROOT).toBe("string")
|
||||
})
|
||||
})
|
||||
|
|
|
@ -5,13 +5,12 @@ import { warning } from "ci-log"
|
|||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-msvc", () => {
|
||||
const isWindows = process.platform === "win32"
|
||||
|
||||
if (process.platform !== "win32") {
|
||||
it.skip("should setup msvc", () => {})
|
||||
return
|
||||
}
|
||||
it("should setup the pre-installed msvc", async () => {
|
||||
try {
|
||||
if (!isWindows) {
|
||||
return
|
||||
}
|
||||
await setupMSVC("", "", process.arch)
|
||||
console.log(which.sync("cl"))
|
||||
} catch (err) {
|
||||
|
@ -22,10 +21,11 @@ describe("setup-msvc", () => {
|
|||
})
|
||||
|
||||
for (const version of [2022, 2019, 2017, 2015]) {
|
||||
if (runnerWindowsVersion() !== undefined && runnerWindowsVersion()! > version) {
|
||||
it.skip(`should setup msvc ${version}`, () => {})
|
||||
return
|
||||
}
|
||||
it(`should setup msvc ${version}`, async () => {
|
||||
if (!isWindows || (runnerWindowsVersion() !== undefined && runnerWindowsVersion()! > version)) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
await setupMSVC(`${version}`, "", process.arch)
|
||||
console.log(which.sync("cl"))
|
||||
|
|
|
@ -4,10 +4,11 @@ import { isUbuntu } from "../../utils/env/isUbuntu"
|
|||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-nala", () => {
|
||||
if (!isUbuntu()) {
|
||||
test.skip("should setup nala", () => {})
|
||||
return
|
||||
}
|
||||
it("should setup nala", async () => {
|
||||
if (!isUbuntu()) {
|
||||
return
|
||||
}
|
||||
const installInfo = await setupNala("", "", process.arch)
|
||||
await testBin("nala", ["--version"], installInfo?.binDir)
|
||||
})
|
||||
|
|
|
@ -3,10 +3,11 @@ import { testBin } from "../../utils/tests/test-helpers"
|
|||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-OpenCppCoverage", () => {
|
||||
if (process.platform !== "win32") {
|
||||
it.skip("should setup OpenCppCoverage", () => {})
|
||||
return
|
||||
}
|
||||
it("should setup OpenCppCoverage", async () => {
|
||||
if (process.platform !== "win32") {
|
||||
return
|
||||
}
|
||||
const installationInfo = await setupOpencppcoverage("", "", process.arch)
|
||||
|
||||
await testBin("OpenCppCoverage", null, installationInfo?.binDir) // OpenCppCoverage exits with non-zero even with --help
|
||||
|
|
Loading…
Reference in New Issue