Bug 1527122 - [release 125] [blackbox] fix flow types for test (#7927). r=dwalsh
authorJason Laster <jason.laster.11@gmail.com>
Mon, 11 Feb 2019 17:00:46 -0800
changeset 458683 745ea4fc4420
parent 458682 44491c6093d4
child 458684 80a68251af66
push id35544
push userccoroiu@mozilla.com
push dateTue, 12 Feb 2019 16:29:08 +0000
treeherdermozilla-central@c849fb69e2e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1527122
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527122 - [release 125] [blackbox] fix flow types for test (#7927). r=dwalsh
devtools/client/debugger/new/src/actions/sources/tests/blackbox.spec.js
--- a/devtools/client/debugger/new/src/actions/sources/tests/blackbox.spec.js
+++ b/devtools/client/debugger/new/src/actions/sources/tests/blackbox.spec.js
@@ -16,17 +16,23 @@ describe("blackbox", () => {
     const store = createStore({ blackBox: async () => true });
     const { dispatch, getState } = store;
 
     const foo1CSR = makeSource("foo1");
     await dispatch(actions.newSource(foo1CSR));
     await dispatch(actions.toggleBlackBox(foo1CSR.source));
 
     const fooSource = selectors.getSource(getState(), "foo1");
+
+    if (!fooSource) {
+      throw new Error("foo should exist");
+    }
+
+    const thread = (foo1CSR.sourceActor: any).thread;
     const relativeSources = selectors.getRelativeSourcesForThread(
       getState(),
-      foo1CSR.sourceActor.thread
+      thread
     );
 
     expect(relativeSources[fooSource.id].isBlackBoxed).toEqual(true);
     expect(fooSource.isBlackBoxed).toEqual(true);
   });
 });