Skip to content

Commit

Permalink
fixing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
William committed Oct 19, 2020
1 parent 7f442e0 commit 5e9635c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.18.x]
node-version: [10.x, 12.x]

steps:
- uses: actions/checkout@v1
Expand Down
17 changes: 5 additions & 12 deletions tests/server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,9 @@ test('basic test', async () => {

const response = await lambdaServer(app, true)(event);

await expect(response).toEqual({
body: 'SGVsbG8gV29ybGQh',
headers: {
'content-length': '12',
'content-type': 'text/html; charset=utf-8',
date: expect.any(String),
etag: expect.any(String),
'x-powered-by': 'Express',
},
isBase64Encoded: true,
statusCode: 200,
});
await expect(response.body).toEqual('SGVsbG8gV29ybGQh');
await expect(response.isBase64Encoded).toEqual(true);
await expect(response.statusCode).toEqual(200);
await expect(response.headers['content-length']).toEqual('12');
await expect(response.headers['content-type']).toEqual('text/html; charset=utf-8');
});

0 comments on commit 5e9635c

Please sign in to comment.