@@ -17,16 +17,6 @@ const {FollowState} = require('@atom/teletype-client')
17
17
const FakeBufferProxy = require ( './helpers/fake-buffer-proxy' )
18
18
const BufferBinding = require ( '../lib/buffer-binding' )
19
19
20
- /*
21
- We are currently checking if teletype is trying to build against the dev version of atom which uses electron 5.
22
- This is because there is a slight change in electron 5s API and some of the assertions in this tests need to be
23
- changed. The stable and beta version of atom still uses electron 4 inorder to support both electron
24
- versions, the assertions need to be made accordingly. In the future when stable and beta start compiling against
25
- electron 5, these assertions will be simplified.
26
- */
27
- const appName = atom . getAppName ( ) . toLowerCase ( )
28
- const isDevOrBetaBuild = appName . indexOf ( 'atom dev' ) > - 1 || appName . indexOf ( 'atom beta' ) > - 1
29
-
30
20
suite ( 'EditorBinding' , function ( ) {
31
21
if ( process . env . CI ) this . timeout ( process . env . TEST_TIMEOUT_IN_MS )
32
22
@@ -108,31 +98,20 @@ suite('EditorBinding', function () {
108
98
109
99
const cursorDecoratedRanges = getCursorDecoratedRanges ( editor )
110
100
111
- if ( isDevOrBetaBuild ) {
112
- return assert . deepEqual (
113
- cursorDecoratedRanges ,
114
- [
115
- { tail : Point ( 10 , 0 ) , head : Point ( 11 , 4 ) } ,
116
- { tail : Point ( 20 , 5 ) , head : Point ( 20 , 0 ) } ,
117
- { tail : Point ( 3 , 0 ) , head : Point ( 4 , 2 ) } ,
118
- { tail : Point ( 6 , 0 ) , head : Point ( 5 , 0 ) }
119
- ]
120
- )
121
- }
122
-
123
101
assert . deepEqual (
124
102
cursorDecoratedRanges ,
125
103
[
126
- { tail : { row : 3 , column : 0 } , head : { row : 4 , column : 2 } } ,
127
- { tail : { row : 6 , column : 0 } , head : { row : 5 , column : 0 } } ,
128
- { tail : { row : 10 , column : 0 } , head : { row : 11 , column : 4 } } ,
129
- { tail : { row : 20 , column : 5 } , head : { row : 20 , column : 0 } }
104
+ { tail : Point ( 10 , 0 ) , head : Point ( 11 , 4 ) } ,
105
+ { tail : Point ( 20 , 5 ) , head : Point ( 20 , 0 ) } ,
106
+ { tail : Point ( 3 , 0 ) , head : Point ( 4 , 2 ) } ,
107
+ { tail : Point ( 6 , 0 ) , head : Point ( 5 , 0 ) }
130
108
]
131
109
)
132
110
133
111
editor . setSelectedBufferRanges ( [
134
112
[ [ 0 , 0 ] , [ 0 , 4 ] ]
135
113
] )
114
+
136
115
assert . deepEqual (
137
116
editorProxy . selections ,
138
117
{
@@ -164,22 +143,12 @@ suite('EditorBinding', function () {
164
143
165
144
const cursorDecoratedRanges = getCursorDecoratedRanges ( editor )
166
145
167
- if ( isDevOrBetaBuild ) {
168
- return assert . deepEqual (
169
- cursorDecoratedRanges ,
170
- [
171
- { tail : Point ( 10 , 0 ) , head : Point ( 11 , 4 ) } ,
172
- { tail : Point ( 20 , 0 ) , head : Point ( 20 , 5 ) } ,
173
- { tail : Point ( 3 , 0 ) , head : Point ( 4 , 2 ) }
174
- ]
175
- )
176
- }
177
146
assert . deepEqual (
178
147
cursorDecoratedRanges ,
179
148
[
180
- { tail : { row : 3 , column : 0 } , head : { row : 4 , column : 2 } } ,
181
- { tail : { row : 10 , column : 0 } , head : { row : 11 , column : 4 } } ,
182
- { tail : { row : 20 , column : 0 } , head : { row : 20 , column : 5 } }
149
+ { tail : Point ( 10 , 0 ) , head : Point ( 11 , 4 ) } ,
150
+ { tail : Point ( 20 , 0 ) , head : Point ( 20 , 5 ) } ,
151
+ { tail : Point ( 3 , 0 ) , head : Point ( 4 , 2 ) }
183
152
]
184
153
)
185
154
@@ -267,21 +236,11 @@ suite('EditorBinding', function () {
267
236
268
237
const cursorDecoratedRanges = getCursorDecoratedRanges ( editor )
269
238
270
- if ( isDevOrBetaBuild ) {
271
- return assert . deepEqual (
272
- cursorDecoratedRanges ,
273
- [
274
- { tail : Point ( 0 , 3 ) , head : Point ( 0 , 3 ) } ,
275
- { tail : Point ( 0 , 6 ) , head : Point ( 0 , 6 ) }
276
- ]
277
- )
278
- }
279
-
280
239
assert . deepEqual (
281
240
cursorDecoratedRanges ,
282
241
[
283
- { tail : { row : 0 , column : 6 } , head : { row : 0 , column : 6 } } ,
284
- { tail : { row : 0 , column : 3 } , head : { row : 0 , column : 3 } }
242
+ { tail : Point ( 0 , 3 ) , head : Point ( 0 , 3 ) } ,
243
+ { tail : Point ( 0 , 6 ) , head : Point ( 0 , 6 ) }
285
244
]
286
245
)
287
246
} )
0 commit comments