Skip to content

Instantly share code, notes, and snippets.

@pchw
Created May 12, 2015 06:39
Show Gist options
  • Save pchw/ab631a464881de51366c to your computer and use it in GitHub Desktop.
Save pchw/ab631a464881de51366c to your computer and use it in GitHub Desktop.
$ ./node_modules/mocha/bin/mocha -r coffee-script -R spec ./sampletest.coffee
describeA
◦ testA1: beforeEach - A
testA1
✓ testA1
◦ testA2: beforeEach - A
testA2
✓ testA2
describeB
◦ testB1: beforeEach - A
beforeEach - B
testB1
✓ testB1
3 passing (8ms)
require 'coffee-script'
describe 'describeA', ->
beforeEach ->
console.log 'beforeEach - A'
it 'testA1', ->
console.log 'testA1'
describe 'describeB', ->
beforeEach ->
console.log 'beforeEach - B'
it 'testB1', ->
console.log 'testB1'
it 'testA2', ->
console.log 'testA2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment