From c120b731a4e586db8c2df293dab21b3edc879521 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Tue, 8 Dec 2020 11:47:29 -0500 Subject: [PATCH] Add global mock for webpack csp var --- awx/ui_next/src/setupTests.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/ui_next/src/setupTests.js b/awx/ui_next/src/setupTests.js index 7d59ff1a4c..5518d62c93 100644 --- a/awx/ui_next/src/setupTests.js +++ b/awx/ui_next/src/setupTests.js @@ -19,3 +19,8 @@ global.console = { ...console, debug: jest.fn(), }; + +// This global variable is part of our Content Security Policy framework +// and so this mock ensures that we don't encounter a reference error +// when running the tests +global.__webpack_nonce__ = null;