Skip to content

Instantly share code, notes, and snippets.

@jagoda
Created June 11, 2018 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagoda/5c9ff36ea2fd77f46581b02c03b954f1 to your computer and use it in GitHub Desktop.
Save jagoda/5c9ff36ea2fd77f46581b02c03b954f1 to your computer and use it in GitHub Desktop.
Alpha Test
const Alpha = require('@lifeomic/alpha');
const lambda = require('./path/to/lambda/module');
const test = require('ava');
test.beforeEach((test) => {
test.context.client = new Alpha(lambda.handler);
});
test('The lambda returns 200', async (test) => {
const response = await test.context.client.get('/');
test.is(response.status, 200);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment