mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
dca8c0cb6f
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92557 467b73ca-7a2a-4603-9d3b-597d59a354a9
34 lines
657 B
JavaScript
34 lines
657 B
JavaScript
|
|
JSpec.describe('Grammar-less', function(){
|
|
before(function(){
|
|
n = 1
|
|
})
|
|
|
|
it('should work', function(){
|
|
expect(true).to(be, true)
|
|
expect(n).to(equal, 1)
|
|
})
|
|
|
|
describe('with nested describes', function(){
|
|
before(function(){
|
|
hits = []
|
|
})
|
|
|
|
before_each(function(){
|
|
n++
|
|
hits.push('before_each')
|
|
})
|
|
|
|
it('should work', function(){
|
|
expect(true).not_to(be, false)
|
|
expect(n).to(eql, 2)
|
|
expect(hits).to(eql, ['before_each'])
|
|
})
|
|
|
|
it('should work again', function(){
|
|
expect(n).to(eql, 3)
|
|
expect(hits).to(eql, ['before_each', 'before_each'])
|
|
})
|
|
})
|
|
|
|
}) |