Skip to content

Commit

Permalink
Adds failing tests for #400
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethormandy committed May 23, 2015
1 parent d62fb9f commit c171bbb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/helpers.js
Expand Up @@ -13,6 +13,12 @@ describe("helpers", function(){
done()
})

it("should collide if output path is the root of the source directory", function(done) {
helpers.willCollide("/foo/bar/myproject", "/foo/bar/myproject").should.be.true
helpers.willCollide("./", "./").should.be.true
done()
})

it("should not collide if output path is /output", function(done){
helpers.willCollide("/foo/bar/myproject", "/output").should.be.false
helpers.willCollide("/foo/bar/myproject", "/output/").should.be.false
Expand Down Expand Up @@ -47,6 +53,12 @@ describe("helpers", function(){
done()
})

it("should not allow project to compile into the source directory when no name is specified", function(done) {
helpers.willAllow("/foo/bar/myproject", "/foo/bar/myproject").should.be.false
helpers.willAllow("./", "./").should.be.false
done()
})

it("should allow project to compile one directory back if source directory starts with underscore", function(done){
helpers.willAllow("/foo/bar/_myproject", "/foo/bar").should.be.true
helpers.willAllow("/foo/bar/_myproject/", "/foo/bar/").should.be.true
Expand Down Expand Up @@ -128,4 +140,4 @@ describe("helpers", function(){
})
})

})
})

0 comments on commit c171bbb

Please sign in to comment.