Created
March 5, 2014 14:13
-
-
Save nkmry/fbece31a2102bfa6975c to your computer and use it in GitHub Desktop.
Mocha による Unit Test のテンプレ。 done() はテストの終わりを示す関数.コールバック関数内でも呼べる.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var should = require('chai').should(); | |
describe('Hogeのテスト', function(){ | |
describe('Hoge.method1() のテスト', function(){ | |
it('条件1', function(done){ | |
done(); | |
}); | |
it('条件2', function(done){ | |
done(); | |
}); | |
}); | |
describe('Hoge.method2() のテスト', function(){ | |
it('条件1', function(done){ | |
done(); | |
}); | |
it('条件2', function(done){ | |
done(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment