From 6fa4888fbc3469301b88bb30803723c918367444 Mon Sep 17 00:00:00 2001 From: Issei Horie Date: Mon, 24 Jan 2022 00:45:06 +0900 Subject: [PATCH] chore: run format --- test/test-suite.js | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/test/test-suite.js b/test/test-suite.js index bf435273..b01b5128 100644 --- a/test/test-suite.js +++ b/test/test-suite.js @@ -511,18 +511,28 @@ module.exports = function (DOMPurify, window, tests, xssTests) { assert.equal(dirty, clean); // should return the input node assert.equal(dirty.href, ''); // should still sanitize }); - QUnit.test('Config-Flag tests: IN_PLACE insecure root-nodes', function (assert) { - //IN_PLACE with insecure root node (script) - var dirty = document.createElement('script'); - dirty.setAttribute('src', 'data:,alert(1)'); - assert.throws(function(){DOMPurify.sanitize(dirty, { IN_PLACE: true })}); - }); - QUnit.test('Config-Flag tests: IN_PLACE insecure root-nodes', function (assert) { - //IN_PLACE with insecure root node (iframe) - var dirty = document.createElement('iframe'); - dirty.setAttribute('src', 'javascript:alert(1)'); - assert.throws(function(){DOMPurify.sanitize(dirty, { IN_PLACE: true })}); - }); + QUnit.test( + 'Config-Flag tests: IN_PLACE insecure root-nodes', + function (assert) { + //IN_PLACE with insecure root node (script) + var dirty = document.createElement('script'); + dirty.setAttribute('src', 'data:,alert(1)'); + assert.throws(function () { + DOMPurify.sanitize(dirty, { IN_PLACE: true }); + }); + } + ); + QUnit.test( + 'Config-Flag tests: IN_PLACE insecure root-nodes', + function (assert) { + //IN_PLACE with insecure root node (iframe) + var dirty = document.createElement('iframe'); + dirty.setAttribute('src', 'javascript:alert(1)'); + assert.throws(function () { + DOMPurify.sanitize(dirty, { IN_PLACE: true }); + }); + } + ); QUnit.test('Config-Flag tests: FORBID_TAGS', function (assert) { //FORBID_TAGS assert.equal(