Skip to content

Commit

Permalink
make the test pass
Browse files Browse the repository at this point in the history
It was held up a bit by this issue (requiring a Given -> before)

rendro/mocha-given#2
  • Loading branch information
searls committed Dec 9, 2014
1 parent 602e204 commit 79149a0
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions test/js-test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ createCabbageProject = require('./support/create-cabbage-project')
build = require('./../lib/commands/build')


describe 'Hello JavaScript', ->
before (done) ->
@timeout(30000)
tmp.setCwd()
createCabbageProject "pants", ->
tmp.setCwd("pants")
done()
before (done) ->
console.log 'a'
@timeout(30000)
tmp.setCwd()
createCabbageProject "pants", ->
tmp.setCwd("pants")
done()

after ->
@timeout(10000)
tmp.clean()
tmp.resetCwd()
after ->
console.log 'e'
@timeout(10000)
tmp.resetCwd()
tmp.clean()

Given (done) -> build("dist", done)
describe 'Hello JavaScript', ->
before (done) -> build("dist", done)
When -> @result = fs.readFileSync("dist/js/app.js").toString()
Then -> expect(@result).to.contain("Hello, World!")
And -> expect(@result).to.contain("JST['hello.us']")
Expand Down

0 comments on commit 79149a0

Please sign in to comment.