@@ -32,7 +32,6 @@ import {
3232 makeSource
3333} from "../../utils/test-head" ;
3434import { makePendingLocationId } from "../../reducers/breakpoints" ;
35- import expect from "expect.js" ;
3635
3736describe ( "when adding breakpoints" , ( ) => {
3837 it ( "a corresponding pending breakpoint should be added" , async ( ) => {
@@ -42,8 +41,8 @@ describe("when adding breakpoints", () => {
4241
4342 await dispatch ( actions . addBreakpoint ( bp . location ) ) ;
4443 const pendingBps = selectors . getPendingBreakpoints ( getState ( ) ) ;
45- expect ( pendingBps . size ) . to . be ( 2 ) ;
46- expect ( pendingBps . get ( id ) ) . to . eql ( generatePendingBreakpoint ( bp ) ) ;
44+ expect ( pendingBps . size ) . toBe ( 2 ) ;
45+ expect ( pendingBps . get ( id ) ) . toEqual ( generatePendingBreakpoint ( bp ) ) ;
4746 } ) ;
4847
4948 describe ( "adding and deleting breakpoints" , ( ) => {
@@ -65,10 +64,10 @@ describe("when adding breakpoints", () => {
6564 await dispatch ( actions . addBreakpoint ( breakpoint2 . location ) ) ;
6665
6766 const pendingBps = selectors . getPendingBreakpoints ( getState ( ) ) ;
68- expect ( pendingBps . get ( breakpointLocationId1 ) ) . to . eql (
67+ expect ( pendingBps . get ( breakpointLocationId1 ) ) . toEqual (
6968 generatePendingBreakpoint ( breakpoint1 )
7069 ) ;
71- expect ( pendingBps . get ( breakpointLocationId2 ) ) . to . eql (
70+ expect ( pendingBps . get ( breakpointLocationId2 ) ) . toEqual (
7271 generatePendingBreakpoint ( breakpoint2 )
7372 ) ;
7473 } ) ;
@@ -80,8 +79,8 @@ describe("when adding breakpoints", () => {
8079 await dispatch ( actions . removeBreakpoint ( breakpoint1 . location ) ) ;
8180
8281 const pendingBps = selectors . getPendingBreakpoints ( getState ( ) ) ;
83- expect ( pendingBps . has ( breakpointLocationId1 ) ) . not . to . be ( true ) ;
84- expect ( pendingBps . has ( breakpointLocationId2 ) ) . to . be ( true ) ;
82+ expect ( pendingBps . has ( breakpointLocationId1 ) ) . not . toBe ( true ) ;
83+ expect ( pendingBps . has ( breakpointLocationId2 ) ) . toBe ( true ) ;
8584 } ) ;
8685 } ) ;
8786} ) ;
@@ -98,7 +97,7 @@ describe("when changing an existing breakpoint", () => {
9897 ) ;
9998 const bps = selectors . getPendingBreakpoints ( getState ( ) ) ;
10099 const breakpoint = bps . get ( id ) ;
101- expect ( breakpoint . condition ) . to . be ( "2" ) ;
100+ expect ( breakpoint . condition ) . toBe ( "2" ) ;
102101 } ) ;
103102
104103 it ( "if disabled, updates corresponding pendingBreakpoint" , async ( ) => {
@@ -110,7 +109,7 @@ describe("when changing an existing breakpoint", () => {
110109 await dispatch ( actions . disableBreakpoint ( bp . location ) ) ;
111110 const bps = selectors . getPendingBreakpoints ( getState ( ) ) ;
112111 const breakpoint = bps . get ( id ) ;
113- expect ( breakpoint . disabled ) . to . be ( true ) ;
112+ expect ( breakpoint . disabled ) . toBe ( true ) ;
114113 } ) ;
115114
116115 it ( "does not delete the pre-existing pendingBreakpoint" , async ( ) => {
@@ -124,7 +123,7 @@ describe("when changing an existing breakpoint", () => {
124123 ) ;
125124 const bps = selectors . getPendingBreakpoints ( getState ( ) ) ;
126125 const breakpoint = bps . get ( id ) ;
127- expect ( breakpoint . condition ) . to . be ( "2" ) ;
126+ expect ( breakpoint . condition ) . toBe ( "2" ) ;
128127 } ) ;
129128} ) ;
130129
@@ -134,7 +133,7 @@ describe("initializing when pending breakpoints exist in perfs", () => {
134133 const id = makePendingLocationId ( theMockedPendingBreakpoint . location ) ;
135134 const bps = selectors . getPendingBreakpoints ( getState ( ) ) ;
136135 const bp = bps . get ( id ) ;
137- expect ( bp ) . to . eql ( generatePendingBreakpoint ( theMockedPendingBreakpoint ) ) ;
136+ expect ( bp ) . toEqual ( generatePendingBreakpoint ( theMockedPendingBreakpoint ) ) ;
138137 } ) ;
139138
140139 it ( "readding breakpoints update existing pending breakpoints" , async ( ) => {
@@ -144,7 +143,7 @@ describe("initializing when pending breakpoints exist in perfs", () => {
144143 await dispatch ( actions . addBreakpoint ( bar . location ) ) ;
145144
146145 const bps = selectors . getPendingBreakpoints ( getState ( ) ) ;
147- expect ( bps . size ) . to . be ( 1 ) ;
146+ expect ( bps . size ) . toBe ( 1 ) ;
148147 } ) ;
149148
150149 it ( "adding bps doesn't remove existing pending breakpoints" , async ( ) => {
@@ -154,7 +153,7 @@ describe("initializing when pending breakpoints exist in perfs", () => {
154153 await dispatch ( actions . addBreakpoint ( bp . location ) ) ;
155154
156155 const bps = selectors . getPendingBreakpoints ( getState ( ) ) ;
157- expect ( bps . size ) . to . be ( 2 ) ;
156+ expect ( bps . size ) . toBe ( 2 ) ;
158157 } ) ;
159158} ) ;
160159
@@ -163,25 +162,25 @@ describe("adding sources", () => {
163162 const { dispatch, getState } = createStore ( simpleMockThreadClient ) ;
164163
165164 let bps = selectors . getBreakpoints ( getState ( ) ) ;
166- expect ( bps . size ) . to . be ( 0 ) ;
165+ expect ( bps . size ) . toBe ( 0 ) ;
167166
168167 const source = makeSource ( "bar.js" ) ;
169168 await dispatch ( actions . newSource ( source ) ) ;
170169 bps = selectors . getBreakpoints ( getState ( ) ) ;
171- expect ( bps . size ) . to . be ( 1 ) ;
170+ expect ( bps . size ) . toBe ( 1 ) ;
172171 } ) ;
173172
174173 it ( "add corresponding breakpoints for multiple sources" , async ( ) => {
175174 const { dispatch, getState } = createStore ( simpleMockThreadClient ) ;
176175
177176 let bps = selectors . getBreakpoints ( getState ( ) ) ;
178- expect ( bps . size ) . to . be ( 0 ) ;
177+ expect ( bps . size ) . toBe ( 0 ) ;
179178
180179 const source1 = makeSource ( "bar.js" ) ;
181180 const source2 = makeSource ( "foo.js" ) ;
182181 await dispatch ( actions . newSources ( [ source1 , source2 ] ) ) ;
183182 bps = selectors . getBreakpoints ( getState ( ) ) ;
184- expect ( bps . size ) . to . be ( 1 ) ;
183+ expect ( bps . size ) . toBe ( 1 ) ;
185184 } ) ;
186185} ) ;
187186
@@ -201,6 +200,6 @@ describe("invalid breakpoint location", () => {
201200 await dispatch ( actions . addBreakpoint ( bp . location ) ) ;
202201 const pendingBps = selectors . getPendingBreakpoints ( getState ( ) ) ;
203202 const pendingBp = pendingBps . get ( correctedPendingId ) ;
204- expect ( pendingBp ) . to . eql ( generatePendingBreakpoint ( slidBp ) ) ;
203+ expect ( pendingBp ) . toEqual ( generatePendingBreakpoint ( slidBp ) ) ;
205204 } ) ;
206205} ) ;
0 commit comments