diff options
author | Johannes <johannes.ewald@roomieplanet.de> | 2012-07-03 05:03:31 +0400 |
---|---|---|
committer | Johannes <johannes.ewald@roomieplanet.de> | 2012-07-03 05:03:31 +0400 |
commit | dfe9ba7d197263641ac1d0247993bd7fa938b2c5 (patch) | |
tree | 6e14a3475bae22461781d675e61dcaabb368a678 /test/detectStrictMode.test.js | |
parent | 8bfdd979dabc1a0ab2e85fd80548d66bccdd1b82 (diff) |
- fixed bug when using b.addEntry()
- small fixes
Diffstat (limited to 'test/detectStrictMode.test.js')
-rw-r--r-- | test/detectStrictMode.test.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/detectStrictMode.test.js b/test/detectStrictMode.test.js index a154471..dad674c 100644 --- a/test/detectStrictMode.test.js +++ b/test/detectStrictMode.test.js @@ -3,11 +3,11 @@ var expect = require("expect.js"), describe("detectStrictMode", function () {
it("should detect \"use strict\"; at the beginning of a string and ignore all whitespace before", function () {
- expect(detectStrictMode('"use strict";')).to.be(true);
- expect(detectStrictMode(' "use strict";')).to.be(true);
- expect(detectStrictMode(' \n "use strict";')).to.be(true);
+ expect(detectStrictMode('"use strict";') === true).to.be(true);
+ expect(detectStrictMode(' "use strict";') === true).to.be(true);
+ expect(detectStrictMode(' \n "use strict";') === true).to.be(true);
});
it("should not detect \"use strict\"; if it occurs in some nested function", function () {
- expect(detectStrictMode('function () {"use strict";}')).to.be(false);
+ expect(detectStrictMode('function () {"use strict";}') === false).to.be(true);
});
});
\ No newline at end of file |