From 1eba604dc12a3d34be6d760fbc790ec5b811dd9b Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 18 Jun 2011 15:34:18 -0300 Subject: [PATCH] Refactored `if node` static analysis test. --- test/node/builder.test.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/node/builder.test.js b/test/node/builder.test.js index 93da0495..38a7e4b2 100644 --- a/test/node/builder.test.js +++ b/test/node/builder.test.js @@ -87,14 +87,15 @@ module.exports = { var custom = '// if node \nvar hello = "world";\n' + '// end node\nvar pew = "pew";'; - builder({ custom: [custom], minify: false }, function (error, result) { - assert.ok(!error); + builder({ custom: [custom], minify: false }, function (err, result) { + should.strictEqual(err, null); - result.indexOf(custom).should.be.equal(-1); - result.indexOf('// if node').should.be.equal(-1); - result.indexOf('// end node').should.be.equal(-1); - result.indexOf('"world"').should.be.equal(-1); - result.indexOf('var pew = "pew"').should.be.above(-1); + result.should().not.include.string(custom); + result.should().not.include.string('// if node'); + result.should().not.include.string('// end node'); + result.should().not.include.string('"world"'); + + result.should().include.string('var pew = "pew"'); }); },