test: restore the environment before each msvc test

This commit is contained in:
Amin Yahyaabadi 2021-12-06 03:48:17 -06:00
parent 313d3ece41
commit 95f4f7daa1
1 changed files with 6 additions and 0 deletions

View File

@ -2,8 +2,14 @@ import which from "which"
import { testBin } from "../../utils/tests/test-helpers"
import { setupMSVC } from "../msvc"
const initial_env = { ...process.env }
jest.setTimeout(300000)
describe("setup-msvc", () => {
beforeEach(() => {
process.env = initial_env
})
it("should setup msvc 2019", async () => {
if (process.platform !== "win32") {
return