Update test with module wrapper

This commit is contained in:
James M. Greene
2023-03-06 22:08:01 -06:00
parent 6f75b9951c
commit 93872af9c4

View File

@@ -44,7 +44,7 @@ describe('with variables missing', () => {
}) })
}) })
describe('create', () => { describe('Deployment', () => {
beforeAll(() => { beforeAll(() => {
process.env.ACTIONS_RUNTIME_URL = 'http://my-url/' process.env.ACTIONS_RUNTIME_URL = 'http://my-url/'
process.env.GITHUB_RUN_ID = '123' process.env.GITHUB_RUN_ID = '123'
@@ -81,6 +81,7 @@ describe('create', () => {
jest.spyOn(core, 'debug').mockImplementation(jest.fn()) jest.spyOn(core, 'debug').mockImplementation(jest.fn())
}) })
describe('#create', () => {
afterEach(() => { afterEach(() => {
// Remove mock for `core.getInput('preview')` // Remove mock for `core.getInput('preview')`
delete process.env.INPUT_PREVIEW delete process.env.INPUT_PREVIEW
@@ -193,7 +194,7 @@ describe('create', () => {
}) })
}) })
describe('check', () => { describe('#check', () => {
beforeAll(() => { beforeAll(() => {
process.env.ACTIONS_RUNTIME_URL = 'http://my-url/' process.env.ACTIONS_RUNTIME_URL = 'http://my-url/'
process.env.GITHUB_RUN_ID = '123' process.env.GITHUB_RUN_ID = '123'
@@ -272,3 +273,4 @@ describe('check', () => {
deploymentStatusScope.done() deploymentStatusScope.done()
}) })
}) })
})