Permalink
Browse files

Test the hello lambda

  • Loading branch information...
rricard committed Nov 29, 2015
1 parent 860fd19 commit 076ac7916bb36d89826a921ce14eefc088063e16
Showing with 24 additions and 0 deletions.
  1. +24 −0 tests/hello.js
@@ -0,0 +1,24 @@
import assert from "assert";
import {lambdaPromisifier} from "../lib/lambda-promisifier.js"
import {hello} from "../lambdas/hello.js"
const promisifiedHello = lambdaPromisifier(hello);
describe("hello lambda", function() {
it("should greet the world by default", function(done) {
promisifiedHello({})
.then(res => {
assert.equal(res, "Hello world!")
})
.then(() => done(), done);
});
it("should greet someone when precised", function(done) {
promisifiedHello({name: "someone"})
.then(res => {
assert.equal(res, "Hello someone!")
})
.then(() => done(), done);
});
});

0 comments on commit 076ac79

Please sign in to comment.