Skip to content

Commit 0ba32d2

Browse files
committed
added specs for testing json scripts
1 parent e62e72a commit 0ba32d2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Specs/Browser/Browser.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ describe('String.stripScripts', function(){
4949
expect(window.stripScriptsSpec).to.equal(4242);
5050
});
5151

52+
it('should not execute json scripts', function(){
53+
expect('<div><script type="application/json">var stripScriptsSpec424242 = 424242;</script></div>'.stripScripts()).to.equal('<div></div>');
54+
expect(window.stripScriptsSpec424242).to.equal(undefined);
55+
});
56+
5257
});
5358

5459
describe('Document', function(){

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"grunt-karma": "^2.0.0",
3838
"grunt-mocha-test": "^0.12.7",
3939
"grunt-mootools-packager": "^0.4.0",
40-
"karma": "^1.7.0",
40+
"karma": "^1.7.1",
4141
"karma-expect": "^1.1",
4242
"karma-mocha": "^0.2.0",
4343
"karma-phantomjs-launcher": "^1.0.4",

0 commit comments

Comments
 (0)