-
-
Notifications
You must be signed in to change notification settings - Fork 797
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scenario test for docker with serverless-webpack
- Loading branch information
1 parent
c72ea53
commit 70cc3ca
Showing
7 changed files
with
4,448 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
tests/scenario/docker-serverless-webpack-test/docker-serverless-webpack.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
}) | ||
}) |
Oops, something went wrong.