Skip to content

Commit

Permalink
Add scenario test for docker with serverless-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Dec 18, 2019
1 parent c72ea53 commit 70cc3ca
Show file tree
Hide file tree
Showing 7 changed files with 4,448 additions and 0 deletions.
@@ -0,0 +1,37 @@
import { resolve } from 'path'
import fetch from 'node-fetch'
import {
joinUrl,
setup,
teardown,
} from '../../integration/_testHelpers/index.js'

jest.setTimeout(120000)

const _describe = process.env.DOCKER_DETECTED ? describe : describe.skip

_describe('docker and serverless-webpack', () => {
// init
beforeAll(
() =>
setup({
servicePath: resolve(__dirname),
}),
110000,
)

// cleanup
afterAll(() => teardown())

test('should work with docker and serverless-webpack', async () => {
const url = joinUrl(TEST_BASE_URL, '/docker-serverless-webpack')
const response = await fetch(url)
const json = await response.json()

const expected = {
hello: 'docker and serverless-webpack!',
}

expect(json).toEqual(expected)
})
})

0 comments on commit 70cc3ca

Please sign in to comment.