Skip to content

Instantly share code, notes, and snippets.

@sue445
Last active December 28, 2015 16:39
Show Gist options
  • Save sue445/7530471 to your computer and use it in GitHub Desktop.
Save sue445/7530471 to your computer and use it in GitHub Desktop.
jasmineのdescibeの中がテストケースごとに初期化されるか調べてみた
describe("num", function(){
var num = 0;
it("should == 1 (1st)", function(){
num++;
expect(num).toEqual(1);
});
it("should == 1 (2nd)", function(){
// 毎回初期化されてるならこのテストも通るはず
num++;
expect(num).toEqual(1);
});
});
@sue445
Copy link
Author

sue445 commented Nov 18, 2013

Error: Expected 2 to equal 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment