In the spec DSL, context is an alias for describe. However, mocha-gwt only wraps describe; using context can result in crosstalk between specs. For example:
describe 'context bug', ->
describe 'describes', ->
describe 'A', ->
When -> @result = 'abc'
Then -> @result == 'abc'
describe 'B', ->
When -> @result = '123'
Then -> @result == '123'
describe 'contexts', ->
context 'A', ->
When -> @result = 'abc'
Then -> @result == 'abc'
context 'B', ->
When -> @result = '123'
Then -> @result == '123'
Fails with:
1) context bug contexts then this.result === 'abc':
Expected Expected 123 === abc
+ expected - actual
-123
+abc
Error
In the spec DSL,
context
is an alias fordescribe
. However,mocha-gwt
only wrapsdescribe
; usingcontext
can result in crosstalk between specs. For example:Fails with: