Skip to content

Instantly share code, notes, and snippets.

@lkptrzk
Created February 28, 2014 19:24
Show Gist options
  • Select an option

  • Save lkptrzk/9277897 to your computer and use it in GitHub Desktop.

Select an option

Save lkptrzk/9277897 to your computer and use it in GitHub Desktop.
shared state/context in mocha tests
var assert = require('assert')
describe('', function () {
beforeEach(function () {
this.foo = 'ABCD'
})
it('should share state', function () {
assert.ok(this.foo === 'ABCD')
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment