# test-lambda

> Unit test AWS Lambda functions

Latest version **1.0.2** (published 2016-03-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install test-lambda
pnpm add test-lambda
yarn add test-lambda
bun add test-lambda
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-03-02 |
| First published | 2016-02-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jeff Carpenter |
| Maintainers | jeffcarp |
| Keywords | aws, lambda, test, mock |

## Links

- npm: https://www.npmjs.com/package/test-lambda
- Repository: https://github.com/jeffcarp/test-lambda
- Homepage: https://github.com/jeffcarp/test-lambda#readme
- Issues: https://github.com/jeffcarp/test-lambda/issues
- npm.io page: https://npm.io/package/test-lambda

## Dependencies (1)

- [proxyquire](https://npm.io/package/proxyquire.md) ^1.7.4

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-03-02
- 1.0.1 — 2016-02-26

## README

# `test-lambda`

[AWS Lambda](https://aws.amazon.com/lambda/) is really cool, but you know what's also cool? Tests. This is a module for unit testing Lambda functions. It should work with Mocha, Jasmine, Tape, or whatever test framework you use.

> :rotating_light: **Status:** OK for basic tests. Also attempts to mock `dynamodb-doc` but it's not a complete feature.

```js
var assert = require('assert')
var testMyLambda = require('test-lambda').test(path.resolve('./path/to/your/lambda/index.js'))

it('returns something', function (done) {
  testMyLambda({
    operation: 'get',
    id: 'an-id',
  }, function (status, data) {
    assert(status === 'succeed')
    done()
  })
})
```

# Install

```bash
npm install test-lambda
```

---
_Source: https://npm.io/package/test-lambda · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
