@@ -38,7 +38,8 @@ import {
38
38
getRemoteHttpOrigin ,
39
39
} from './exampleMiner' ;
40
40
41
- describe ( 'example mining' , ( ) => {
41
+ /** eslint-disable jest/no-disabled-tests */
42
+ describe . skip ( 'example mining' , ( ) => {
42
43
const sourcePath = path . join ( __dirname , '/../../../examples' ) ;
43
44
const exampleFile = ( fileName : string ) =>
44
45
path . join ( sourcePath , '/' , fileName ) ;
@@ -72,7 +73,7 @@ describe('example mining', () => {
72
73
it ( 'getCommitHash' , ( ) => {
73
74
const actual = getCommitHash ( ) ;
74
75
expect ( actual ) . toBeDefined ( ) ;
75
- expect ( actual . length ) . toEqual ( 40 ) ;
76
+ expect ( actual ) . toHaveLength ( 40 ) ;
76
77
} ) ;
77
78
it ( 'getRemoteHttpOrigin' , ( ) => {
78
79
const actual = getRemoteHttpOrigin ( ) ;
@@ -112,7 +113,7 @@ describe('example mining', () => {
112
113
it ( 'processes standard url patterns' , ( ) => {
113
114
const md = '[summary1](example.ts#strip me!)' ;
114
115
const actual = marker . mineContent ( 'example/typescript/README.md' , md ) ;
115
- expect ( actual . length ) . toEqual ( 1 ) ;
116
+ expect ( actual ) . toHaveLength ( 1 ) ;
116
117
const first = actual [ 0 ] ;
117
118
expect ( first . summary ) . toEqual ( 'summary1' ) ;
118
119
expect ( first . sourceFile ) . toEqual ( 'example/typescript/example.ts' ) ;
@@ -124,7 +125,7 @@ describe('example mining', () => {
124
125
'packages/sdk-codegen/README.md' ,
125
126
md
126
127
) ;
127
- expect ( actual . length ) . toEqual ( 2 ) ;
128
+ expect ( actual ) . toHaveLength ( 2 ) ;
128
129
const first = actual [ 0 ] ;
129
130
expect ( first . summary ) . toEqual ( 'TypeScript' ) ;
130
131
expect ( first . sourceFile ) . toEqual (
@@ -141,7 +142,7 @@ describe('example mining', () => {
141
142
const md =
142
143
'Logout all users on the instance [[link]](logout_all_users.rb)' ;
143
144
const actual = marker . mineContent ( 'example/ruby/README.md' , md ) ;
144
- expect ( actual . length ) . toEqual ( 1 ) ;
145
+ expect ( actual ) . toHaveLength ( 1 ) ;
145
146
const first = actual [ 0 ] ;
146
147
expect ( first . summary ) . toEqual ( 'Logout all users on the instance' ) ;
147
148
expect ( first . sourceFile ) . toEqual ( 'example/ruby/logout_all_users.rb' ) ;
@@ -150,16 +151,17 @@ describe('example mining', () => {
150
151
const md =
151
152
'\t - Logout all users on the instance [[link]](logout_all_users.rb)' ;
152
153
const actual = marker . mineContent ( 'example/ruby/README.md' , md ) ;
153
- expect ( actual . length ) . toEqual ( 1 ) ;
154
+ expect ( actual ) . toHaveLength ( 1 ) ;
154
155
const first = actual [ 0 ] ;
155
156
expect ( first . summary ) . toEqual ( 'Logout all users on the instance' ) ;
156
157
expect ( first . sourceFile ) . toEqual ( 'example/ruby/logout_all_users.rb' ) ;
157
158
} ) ;
159
+ /** eslint-disable jest/no-disabled-tests */
158
160
it . skip ( 'processes multiple link url patterns and strips leading dash' , ( ) => {
159
161
const md =
160
162
'\t - Logout all users on the instance [[link]](logout_all_users.rb) logs in [[link]](logs_in.rb)' ;
161
163
const actual = marker . mineContent ( 'example/ruby/README.md' , md ) ;
162
- expect ( actual . length ) . toEqual ( 2 ) ;
164
+ expect ( actual ) . toHaveLength ( 2 ) ;
163
165
const first = actual [ 0 ] ;
164
166
expect ( first . summary ) . toEqual ( 'Logout all users on the instance' ) ;
165
167
expect ( first . sourceFile ) . toEqual ( 'example/ruby/logout_all_users.rb' ) ;
@@ -182,31 +184,37 @@ describe('example mining', () => {
182
184
expect ( actual ) . toEqual ( expected ) ;
183
185
} ;
184
186
187
+ /** eslint-disable jest/expect-expect */
185
188
it ( 'is empty for no sdk calls' , ( ) => {
186
189
probe ( '' , [ ] ) ;
187
190
probe ( 'one() two() three()' , [ ] ) ;
188
191
probe ( 'foo.one() bar.two() boo.three()' , [ ] ) ;
189
192
probe ( 'foo.one()\nbar.two()\nboo.three()' , [ ] ) ;
190
193
} ) ;
191
194
195
+ /** eslint-disable jest/expect-expect */
192
196
it ( 'ignores ok and finds ts calls' , ( ) => {
193
197
probe ( `const value = await sdk.ok(sdk.me())` , [
194
198
{ sdk : 'sdk' , operationId : 'me' , line : 1 , column : 27 } ,
195
199
] ) ;
196
200
} ) ;
197
201
202
+ /** eslint-disable jest/expect-expect */
198
203
it ( 'ignores ok and finds kotlin calls' , ( ) => {
199
204
probe ( `val look = sdk.ok<Look>(sdk.create_look(WriteLookWithQuery(` , [
200
205
{ sdk : 'sdk' , operationId : 'create_look' , line : 1 , column : 24 } ,
201
206
] ) ;
202
207
} ) ;
203
208
209
+ /** eslint-disable jest/no-disabled-tests */
210
+ /** eslint-disable jest/expect-expect */
204
211
it . skip ( 'ignores comments and ok' , ( ) => {
205
212
probe (
206
213
`// this is a code comment sdk.comment()\nconst value = await coreSDK.ok(coreSDK.me())` ,
207
214
[ { sdk : 'coreSDK' , operationId : 'me' , line : 2 , column : 33 } ]
208
215
) ;
209
216
} ) ;
217
+ /** eslint jest/expect-expect: 1 */
210
218
211
219
it ( 'mines a python file' , ( ) => {
212
220
const fileName = exampleFile ( 'python/run_look_with_filters.py' ) ;
0 commit comments