Skip to content

Commit

Permalink
spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniegarcia committed Mar 2, 2015
1 parent 7747e32 commit 593144a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 6 additions & 4 deletions src/test/test.es6
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,23 @@ 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', () => {
console.log(fw('server listening'));

const closePromise = closeProposal(),
isAPromise = (closePromise instanceof Promise);

assert.ok(isAPromise, errify('closePromise is not a Promise!'));

closePromise.then(() => {
Expand Down

0 comments on commit 593144a

Please sign in to comment.