Permalink
Browse files

Make tests more robust when there isn't "use strict" or code is regen…

…erated
  • Loading branch information...
arian committed Nov 11, 2012
1 parent e7f9854 commit 9ec7a9f140b9e5bfa48a308dfde125fb68cc0123
Showing with 5 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +3 −1 test/prime/index.js
  3. +1 −1 test/types/number.js
View
@@ -3,3 +3,4 @@ node_modules/
color/*
amd/
dist/
+cov*
View
@@ -113,7 +113,9 @@ describe("prime constructors", function(){
var three = new Three();
expect(three.id).to.be("TWO");
- expect(one.constructor.toString()).to.be((function(){}).toString())
+ var actual = one.constructor.toString().replace(/\s+/g, '')
+ var expected = (function(){}).toString().replace(/\s+/g, '')
+ expect(actual).to.be(expected)
expect(Three.prototype.constructor).to.be.a('function')
})
View
@@ -35,7 +35,7 @@ describe('types/number', function(){
number.times(5, function(i, j, k){
buffer1.push(i)
buffer2.push(j)
- buffer3.push(k)
+ buffer3.push(+k)
buffer4.push(this)
}, 1)
expect(buffer1).to.eql([0, 1, 2, 3, 4])

0 comments on commit 9ec7a9f

Please sign in to comment.