Skip to content

Commit

Permalink
Merge pull request #142 from chaijs/vieiralucas-patch-1
Browse files Browse the repository at this point in the history
Fix some bad semicolon placements at README.md
  • Loading branch information
keithamus committed Jan 20, 2017
2 parents ffe1f62 + 4470f99 commit d6e1294
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Expand Up @@ -147,15 +147,15 @@ it('fails, as expected', function(done) { // <= Pass in done callback
expect(res).to.have.status(123);
done(); // <= Call done to signal callback end
});
}) ;
});

it('succeeds silently!', function() { // <= No done callback
chai.request('http://localhost:8080')
.get('/')
.end(function(err, res) {
expect(res).to.have.status(123); // <= Test completes before this runs
});
}) ;
});
```

When `done` is passed in, Mocha will wait until the call to `done()`, or until
Expand All @@ -176,7 +176,7 @@ chai.request(app)
})
.catch(function (err) {
throw err;
})
});
```

__Note:__ Node.js version 0.10.x and some older web browsers do not have
Expand All @@ -195,7 +195,6 @@ if (!global.Promise) {
}
var chai = require('chai');
chai.use(require('chai-http'));

```

#### Retaining cookies with each request
Expand All @@ -216,8 +215,8 @@ agent
return agent.get('/user/me')
.then(function (res) {
expect(res).to.have.status(200);
})
})
});
});
```

## Assertions
Expand Down

0 comments on commit d6e1294

Please sign in to comment.