Skip to content

Commit

Permalink
add tests for browserify func
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereOverfl0w committed Sep 21, 2015
1 parent cc9a28e commit 2f84cba
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/fixtures/path-prefix/app.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
browserify = require '../../..'

module.exports =
ignores: ["**/_*", "**/.DS_Store"]
extensions: [browserify(files: "index.coffee", out: "build.js")]
1 change: 1 addition & 0 deletions test/fixtures/path-prefix/index.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log 'wowe, such test.'
1 change: 1 addition & 0 deletions test/fixtures/path-prefix/index.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!= browserify('../')
7 changes: 7 additions & 0 deletions test/fixtures/path-prefix/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "test",
"dependencies": {
"coffee-script": "^1.10.0",
"jade": "^1.11.0"
}
}
8 changes: 8 additions & 0 deletions test/test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,11 @@ describe 'cacheing in watch mode', ->
, 3000

it 'invalidates the cache when a file changes'

describe 'path-prefix', ->

before (done) -> compile_fixture.call(@, 'path-prefix', -> done())

it 'should include the build.js', ->
out = path.join(@public, 'index.html')
h.file.contains(out, "<script src='../build.js'></script>").should.be.ok

0 comments on commit 2f84cba

Please sign in to comment.