-
-
Save cohama/5c72a6ce8bf775a23e07 to your computer and use it in GitHub Desktop.
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 assert = require('assert'); | |
describe('hoge', function() { | |
beforeEach(function() { | |
this.foo = 1; | |
this.bar = 5; | |
THIS = this; | |
}); | |
it('first', function() { | |
assert.equal(1, this.foo); | |
}); | |
describe('child scope', function() { | |
beforeEach(function() { | |
this.foo = 5; | |
}); | |
it('first child', function() { | |
assert.equal(this.bar, this.foo); | |
}); | |
it('is prototype', function() { | |
assert.equal(THIS, this.__proto__); | |
}); | |
}); | |
describe('child scope 2', function() { | |
it('last child', function() { | |
assert.equal(1, this.foo); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment