Skip to content

Commit

Permalink
Add missing require for DOMPurify
Browse files Browse the repository at this point in the history
  • Loading branch information
alagane committed Nov 9, 2021
1 parent 718b0ea commit 4742dde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/frontend/js/modules/core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const _ = require('lodash');
const juice = require('juice');
const DOMPurify = require('dompurify');

(function(angular) {
'use strict';
Expand Down
5 changes: 1 addition & 4 deletions src/frontend/js/modules/core.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

const DOMPurify = require('dompurify/dist/purify.js');

/* global chai, sinon: false */

var { expect } = chai;
Expand Down Expand Up @@ -423,12 +421,11 @@ describe('The Angular core module', function() {
});
});

describe('The htmlCleaner service', function() {
describe.only('The htmlCleaner service', function() {
let htmlCleaner;

beforeEach(function() {
angular.mock.inject(function($window, $injector) {
$window.DOMPurify = DOMPurify;
htmlCleaner = $injector.get('htmlCleaner');
});
});
Expand Down

0 comments on commit 4742dde

Please sign in to comment.