Skip to content

Commit

Permalink
test(stacks.web): add mock stack env to unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
  • Loading branch information
BradenM committed Sep 23, 2023
1 parent 18bee66 commit fe2aaea
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/stacks/web/test/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ describe('CrisisCleanupWeb', () => {
const sourcePath = path.join(os.tmpdir(), 'crisiscleanup-web-test')
const tempDir = await fs.mkdtemp(sourcePath)
const app = new App()
const stack = new CrisisCleanupWeb(app, 'test-crisiscleanup-site', {
source: tempDir,
fqdn: 'app.test.crisiscleanup.org',
domainName: 'test.crisiscleanup.org',
globalPriceClass: false,
})
const stack = new CrisisCleanupWeb(
app,
'test-crisiscleanup-site',
{
source: tempDir,
fqdn: 'app.test.example.org',
domainName: 'test.example.org',
globalPriceClass: false,
},
{ env: { account: '123', region: 'us-east-1' } },
)
const template = Template.fromStack(stack)
expect(template.toJSON()).toMatchSnapshot()
})
Expand Down

0 comments on commit fe2aaea

Please sign in to comment.