From 2a8f5ebf24742085bcaa09e966131b7fa5bdf749 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 13 Apr 2020 17:30:24 +0300 Subject: [PATCH] test: check last element returned by insertElement --- .../core/src/lib/tests/content.strategy.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/tests/content.strategy.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/content.strategy.spec.ts index e742313135..e1a5ceb86e 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/content.strategy.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/content.strategy.spec.ts @@ -1,9 +1,9 @@ import { + CONTENT_SECURITY_STRATEGY, CONTENT_STRATEGY, - StyleContentStrategy, - ScriptContentStrategy, DOM_STRATEGY, - CONTENT_SECURITY_STRATEGY, + ScriptContentStrategy, + StyleContentStrategy, } from '../strategies'; import { uuid } from '../utils'; @@ -26,8 +26,8 @@ describe('StyleContentStrategy', () => { domStrategy.insertElement = jest.fn((el: HTMLScriptElement) => {}) as any; const strategy = new StyleContentStrategy('', domStrategy, contentSecurityStrategy); - const element = strategy.createElement(); - strategy.insertElement(); + strategy.createElement(); + const element = strategy.insertElement(); expect(contentSecurityStrategy.applyCSP).toHaveBeenCalledWith(element); expect(domStrategy.insertElement).toHaveBeenCalledWith(element);