Skip to content

Commit

Permalink
added specs for testing json scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mavstuff committed Feb 14, 2020
1 parent e62e72a commit 0ba32d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Specs/Browser/Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ describe('String.stripScripts', function(){
expect(window.stripScriptsSpec).to.equal(4242);
});

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

});

describe('Document', function(){
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"grunt-karma": "^2.0.0",
"grunt-mocha-test": "^0.12.7",
"grunt-mootools-packager": "^0.4.0",
"karma": "^1.7.0",
"karma": "^1.7.1",
"karma-expect": "^1.1",
"karma-mocha": "^0.2.0",
"karma-phantomjs-launcher": "^1.0.4",
Expand Down

0 comments on commit 0ba32d2

Please sign in to comment.