Merge pull request 'test(api): stop tests leaking module mocks and env into later files' (#14) from fix/ci-test-isolation into main
CI / checks (push) Successful in 25m29s
CI / checks (push) Successful in 25m29s
Reviewed-on: #14
This commit was merged in pull request #14.
This commit is contained in:
@@ -16,7 +16,9 @@ import {AwsLightsailAdapter} from './AwsLightsailAdapter'
|
||||
const originalEndpoint = process.env.FLOCI_ENDPOINT
|
||||
|
||||
afterEach(() => {
|
||||
process.env.FLOCI_ENDPOINT = originalEndpoint
|
||||
// Assigning undefined would store the string "undefined" for every later test file.
|
||||
if (originalEndpoint === undefined) delete process.env.FLOCI_ENDPOINT
|
||||
else process.env.FLOCI_ENDPOINT = originalEndpoint
|
||||
})
|
||||
|
||||
function stubLightsail() {
|
||||
|
||||
Reference in New Issue
Block a user