Skip to content

Instantly share code, notes, and snippets.

@MrRhodes
Last active July 21, 2016 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrRhodes/e403e9aabe76cbd541973410979a20e0 to your computer and use it in GitHub Desktop.
Save MrRhodes/e403e9aabe76cbd541973410979a20e0 to your computer and use it in GitHub Desktop.
testing.1
describe("user api tests", function() {
it("should add a new user to the database", function(done) {
api.put('/user/123')
.then(response => {
assert.equal(response.statusCode, 201)
database.getUserFromId(123)
.then(user => {
assert.equal(user.id, 123);
assert.equal( ... );
done();
})
.catch(done);
})
.catch(done);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment