0
私はproject.Whenでのテストフレームワークとしてのモカを使用しています私はユニットテストを書き、私がすることを好む:いいですか、それとも接続していませんか?
describe('cooperation',() => {
describe('create cooperation', done => {
it('should create a cooperation between A and B', done => {
//make a post request to create a cooperation between A and B
//res.body.should.deepEqual({/*cooperation object*/})
done();
});
});
describe('get cooperation', done => {
before(done => {
//clear any cooperation in database
//initital cooperation between A and B by fixture tool
done();
});
it('get A's partner', done => {
//make a get request to get cooperation of A
//res.body should have B
});
});
});
しかし、私の同僚はに好む:
describe('cooperation',() => {
it('should create a cooperation between A and b', done => {
//make a post request to create a cooperation between A and B
//res.body.should.deepEqual({/*cooperation object*/})
done();
});
it('get A's partner', done => {
//make a get request to get cooperation of A
//res.body should have B
});
});
は私が優れているかを知りたいですなぜ?