@@ -42,14 +42,14 @@ describe('PaneContainerElement', function() {
42
42
] ) ;
43
43
44
44
paneAxis . removeChild ( paneAxis . getChildren ( ) [ 2 ] ) ;
45
- return expect ( childTagNames ( ) ) . toEqual ( [
45
+ expect ( childTagNames ( ) ) . toEqual ( [
46
46
'atom-pane-axis' ,
47
47
'atom-pane-resize-handle' ,
48
48
'atom-pane-axis'
49
49
] ) ;
50
50
} ) ;
51
51
52
- return it ( 'transfers focus to the next pane if a focused pane is removed' , function ( ) {
52
+ it ( 'transfers focus to the next pane if a focused pane is removed' , function ( ) {
53
53
const container = new PaneContainer ( params ) ;
54
54
const containerElement = container . getElement ( ) ;
55
55
const leftPane = container . getActivePane ( ) ;
@@ -62,7 +62,8 @@ describe('PaneContainerElement', function() {
62
62
expect ( document . activeElement ) . toBe ( rightPaneElement ) ;
63
63
64
64
rightPane . destroy ( ) ;
65
- return expect ( document . activeElement ) . toBe ( leftPaneElement ) ;
65
+ expect ( containerElement ) . toHaveClass ( 'panes' ) ;
66
+ expect ( document . activeElement ) . toBe ( leftPaneElement ) ;
66
67
} ) ;
67
68
} ) ;
68
69
@@ -94,7 +95,7 @@ describe('PaneContainerElement', function() {
94
95
) ;
95
96
expect ( verticalPanes . length ) . toBe ( 2 ) ;
96
97
expect ( verticalPanes [ 0 ] ) . toBe ( pane2 . getElement ( ) ) ;
97
- return expect ( verticalPanes [ 1 ] ) . toBe ( pane3 . getElement ( ) ) ;
98
+ expect ( verticalPanes [ 1 ] ) . toBe ( pane3 . getElement ( ) ) ;
98
99
} ) ) ;
99
100
100
101
describe ( 'when the resize element is dragged ' , function ( ) {
@@ -103,9 +104,7 @@ describe('PaneContainerElement', function() {
103
104
beforeEach ( function ( ) {
104
105
container = new PaneContainer ( params ) ;
105
106
containerElement = container . getElement ( ) ;
106
- return document
107
- . querySelector ( '#jasmine-content' )
108
- . appendChild ( containerElement ) ;
107
+ document . querySelector ( '#jasmine-content' ) . appendChild ( containerElement ) ;
109
108
} ) ;
110
109
111
110
const dragElementToPosition = function ( element , clientX ) {
@@ -125,7 +124,7 @@ describe('PaneContainerElement', function() {
125
124
} )
126
125
) ;
127
126
128
- return element . dispatchEvent (
127
+ element . dispatchEvent (
129
128
new MouseEvent ( 'mouseup' , {
130
129
iew : window ,
131
130
bubbles : true ,
@@ -180,7 +179,7 @@ describe('PaneContainerElement', function() {
180
179
runs ( ( ) => expectPaneScale ( [ leftPane , 0.44 ] , [ rightPane , 1.55 ] ) ) ;
181
180
182
181
waitsForPromise ( ( ) => leftPane . close ( ) ) ;
183
- return runs ( ( ) => expectPaneScale ( [ rightPane , 1 ] ) ) ;
182
+ runs ( ( ) => expectPaneScale ( [ rightPane , 1 ] ) ) ;
184
183
} ) ;
185
184
186
185
it ( 'splits or closes panes in orthogonal direction that the pane is being dragged' , function ( ) {
@@ -206,7 +205,7 @@ describe('PaneContainerElement', function() {
206
205
207
206
// dynamically close pane, the pane's flexscale will recover to origin value
208
207
waitsForPromise ( ( ) => lowerPane . close ( ) ) ;
209
- return runs ( ( ) => expectPaneScale ( [ leftPane , 0.5 ] , [ rightPane , 1.5 ] ) ) ;
208
+ runs ( ( ) => expectPaneScale ( [ leftPane , 0.5 ] , [ rightPane , 1.5 ] ) ) ;
210
209
} ) ;
211
210
212
211
it ( 'unsubscribes from mouse events when the pane is detached' , function ( ) {
@@ -226,19 +225,19 @@ describe('PaneContainerElement', function() {
226
225
227
226
waitsFor ( ( ) => document . addEventListener . callCount === 2 ) ;
228
227
229
- return runs ( function ( ) {
228
+ runs ( function ( ) {
230
229
expect ( element . resizeStopped . callCount ) . toBe ( 0 ) ;
231
230
container . destroy ( ) ;
232
231
expect ( element . resizeStopped . callCount ) . toBe ( 1 ) ;
233
- return expect ( document . removeEventListener . callCount ) . toBe ( 2 ) ;
232
+ expect ( document . removeEventListener . callCount ) . toBe ( 2 ) ;
234
233
} ) ;
235
234
} ) ;
236
235
237
- return it ( 'does not throw an error when resized to fit content in a detached state' , function ( ) {
236
+ it ( 'does not throw an error when resized to fit content in a detached state' , function ( ) {
238
237
container . getActivePane ( ) . splitRight ( ) ;
239
238
const element = getResizeElement ( 0 ) ;
240
239
element . remove ( ) ;
241
- return expect ( ( ) => element . resizeToFitContent ( ) ) . not . toThrow ( ) ;
240
+ expect ( ( ) => element . resizeToFitContent ( ) ) . not . toThrow ( ) ;
242
241
} ) ;
243
242
} ) ;
244
243
@@ -248,7 +247,7 @@ describe('PaneContainerElement', function() {
248
247
beforeEach ( function ( ) {
249
248
const container = new PaneContainer ( params ) ;
250
249
leftPane = container . getActivePane ( ) ;
251
- return ( rightPane = leftPane . splitRight ( ) ) ;
250
+ rightPane = leftPane . splitRight ( ) ;
252
251
} ) ;
253
252
254
253
describe ( 'when pane:increase-size is triggered' , ( ) =>
@@ -262,10 +261,10 @@ describe('PaneContainerElement', function() {
262
261
263
262
atom . commands . dispatch ( rightPane . getElement ( ) , 'pane:increase-size' ) ;
264
263
expect ( leftPane . getFlexScale ( ) ) . toBe ( 1.1 ) ;
265
- return expect ( rightPane . getFlexScale ( ) ) . toBe ( 1.1 ) ;
264
+ expect ( rightPane . getFlexScale ( ) ) . toBe ( 1.1 ) ;
266
265
} ) ) ;
267
266
268
- return describe ( 'when pane:decrease-size is triggered' , ( ) =>
267
+ describe ( 'when pane:decrease-size is triggered' , ( ) =>
269
268
it ( 'decreases the size of the pane' , function ( ) {
270
269
expect ( leftPane . getFlexScale ( ) ) . toBe ( 1 ) ;
271
270
expect ( rightPane . getFlexScale ( ) ) . toBe ( 1 ) ;
@@ -276,16 +275,16 @@ describe('PaneContainerElement', function() {
276
275
277
276
atom . commands . dispatch ( rightPane . getElement ( ) , 'pane:decrease-size' ) ;
278
277
expect ( leftPane . getFlexScale ( ) ) . toBe ( 1 / 1.1 ) ;
279
- return expect ( rightPane . getFlexScale ( ) ) . toBe ( 1 / 1.1 ) ;
278
+ expect ( rightPane . getFlexScale ( ) ) . toBe ( 1 / 1.1 ) ;
280
279
} ) ) ;
281
280
} ) ;
282
281
283
- return describe ( 'when only a single pane is present' , function ( ) {
282
+ describe ( 'when only a single pane is present' , function ( ) {
284
283
let [ singlePane ] = [ ] ;
285
284
286
285
beforeEach ( function ( ) {
287
286
const container = new PaneContainer ( params ) ;
288
- return ( singlePane = container . getActivePane ( ) ) ;
287
+ singlePane = container . getActivePane ( ) ;
289
288
} ) ;
290
289
291
290
describe ( 'when pane:increase-size is triggered' , ( ) =>
@@ -296,18 +295,18 @@ describe('PaneContainerElement', function() {
296
295
expect ( singlePane . getFlexScale ( ) ) . toBe ( 1 ) ;
297
296
298
297
atom . commands . dispatch ( singlePane . getElement ( ) , 'pane:increase-size' ) ;
299
- return expect ( singlePane . getFlexScale ( ) ) . toBe ( 1 ) ;
298
+ expect ( singlePane . getFlexScale ( ) ) . toBe ( 1 ) ;
300
299
} ) ) ;
301
300
302
- return describe ( 'when pane:decrease-size is triggered' , ( ) =>
301
+ describe ( 'when pane:decrease-size is triggered' , ( ) =>
303
302
it ( 'does not decreases the size of the pane' , function ( ) {
304
303
expect ( singlePane . getFlexScale ( ) ) . toBe ( 1 ) ;
305
304
306
305
atom . commands . dispatch ( singlePane . getElement ( ) , 'pane:decrease-size' ) ;
307
306
expect ( singlePane . getFlexScale ( ) ) . toBe ( 1 ) ;
308
307
309
308
atom . commands . dispatch ( singlePane . getElement ( ) , 'pane:decrease-size' ) ;
310
- return expect ( singlePane . getFlexScale ( ) ) . toBe ( 1 ) ;
309
+ expect ( singlePane . getFlexScale ( ) ) . toBe ( 1 ) ;
311
310
} ) ) ;
312
311
} ) ;
313
312
} ) ;
0 commit comments