Skip to content

Commit

Permalink
chore: update files
Browse files Browse the repository at this point in the history
  • Loading branch information
sbstjn committed Feb 20, 2021
1 parent c324a8e commit a71a942
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions aws/stacks/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export class ExampleStack extends cdk.Stack {
topic.addSubscription(new subs.SqsSubscription(queue))

const func = new lambda.NodejsFunction(this, 'ExampleFunction', {
entry: 'src/lambda/handler.ts',
functionName: 'foo',
entry: 'src/example-lambda/handler.ts',
handler: 'run',
})

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { run } from '../../../src/lambda/handler'
import { run } from '../../../src/example-lambda/handler'

describe('Handler', () => {
it('returns string value', async () => {
await expect(
run({fails: false})
run({ fails: false })
).resolves.toBe("Done")
})

it('throws an exception', async () => {
await expect(
run({fails: true})
run({ fails: true })
).rejects.toThrowError('Failed on purpose')
})
})

0 comments on commit a71a942

Please sign in to comment.