Skip to content

Commit 2bf83a0

Browse files
committed
test($parse): ensure CSP code paths are used when testing
Previously, the test suite was not actually taking CSP-mode paths when we were expecting it to. Numerous CSP-mode tests are failing, working on fixing these.
1 parent 5cf1d89 commit 2bf83a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/ng/parseSpec.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,12 @@ describe('parser', function() {
222222
window.document.securityPolicy = originalSecurityPolicy;
223223
});
224224

225-
beforeEach(module(provideLog));
225+
beforeEach(module(function($provide) {
226+
$provide.decorator('$sniffer', function($delegate) {
227+
$delegate.csp = cspEnabled;
228+
return $delegate;
229+
});
230+
}, provideLog));
226231

227232
beforeEach(inject(function ($rootScope) {
228233
scope = $rootScope;

0 commit comments

Comments
 (0)