Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/util/sanitizer.spec.js')
-rw-r--r--js/tests/unit/util/sanitizer.spec.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tests/unit/util/sanitizer.spec.js b/js/tests/unit/util/sanitizer.spec.js
index dcfad8436f..395875d624 100644
--- a/js/tests/unit/util/sanitizer.spec.js
+++ b/js/tests/unit/util/sanitizer.spec.js
@@ -20,7 +20,7 @@ describe('Sanitizer', () => {
const result = sanitizeHtml(template, DefaultAllowlist, null)
- expect(result.indexOf('script') === -1).toEqual(true)
+ expect(result).not.toContain('script')
})
it('should allow aria attributes and safe attributes', () => {
@@ -32,8 +32,8 @@ describe('Sanitizer', () => {
const result = sanitizeHtml(template, DefaultAllowlist, null)
- expect(result.indexOf('aria-pressed') !== -1).toEqual(true)
- expect(result.indexOf('class="test"') !== -1).toEqual(true)
+ expect(result).toContain('aria-pressed')
+ expect(result).toContain('class="test"')
})
it('should remove tags not in allowlist', () => {
@@ -45,7 +45,7 @@ describe('Sanitizer', () => {
const result = sanitizeHtml(template, DefaultAllowlist, null)
- expect(result.indexOf('<script>') === -1).toEqual(true)
+ expect(result).not.toContain('<script>')
})
it('should not use native api to sanitize if a custom function passed', () => {