From 593144add7902366cb14612f6a9abccbf3ec6857 Mon Sep 17 00:00:00 2001 From: vinniegarcia Date: Sun, 1 Mar 2015 22:08:01 -0800 Subject: [PATCH] spelling --- README.md | 2 +- src/test/test.es6 | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 573d346..e17858c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ npm i proposal --save If arguments are supplied, the `nodeback` is executed and a `Promise` is returned. Use it like any other Promise you've used before, with `.then()` and `.catch()`. -If no arguments are supplied, `Propsal` will return a function that, when executed with its parameters, will then return a `Promise`. This is useful if, for example, you want to execute that function multiple times to pass in different arguments. +If no arguments are supplied, `Proposal` will return a function that, when executed with its parameters, will then return a `Promise`. This is useful if, for example, you want to execute that function multiple times to pass in different arguments. ## Examples diff --git a/src/test/test.es6 b/src/test/test.es6 index cd523ab..e3338ae 100644 --- a/src/test/test.es6 +++ b/src/test/test.es6 @@ -52,14 +52,15 @@ describe(h1('Proposal tests'), () => { }); it(cool('Tests a Proposal against a nodeback with no args'), function (done) { - const serv = http.createServer((req, res) => { + const handler = (req, res) => { console.log('hey'); res.writeHead(200); res.end('hello world\n'); - }); - - const closeProposal = Proposal(serv.close.bind(serv)), + }, + serv = http.createServer(handler), + closeProposal = Proposal(serv.close.bind(serv)), isntAPromise = !(closeProposal instanceof Promise); + assert.ok(isntAPromise, errify('You made an empty Promise with server.close!')); serv.on('listening', () => { @@ -67,6 +68,7 @@ describe(h1('Proposal tests'), () => { const closePromise = closeProposal(), isAPromise = (closePromise instanceof Promise); + assert.ok(isAPromise, errify('closePromise is not a Promise!')); closePromise.then(() => {