File tree 4 files changed +20
-6
lines changed
4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,8 @@ In `capacitor.config.json`:
228
228
{
229
229
"plugins" : {
230
230
"Haptics" : {
231
- "style" : undefined ,
232
- "duration" : undefined
231
+ "style" : " native " ,
232
+ "duration" : 123
233
233
}
234
234
}
235
235
}
@@ -245,8 +245,8 @@ import { CapacitorConfig } from '@capacitor/cli';
245
245
const config: CapacitorConfig = {
246
246
plugins: {
247
247
Haptics: {
248
- style: undefined ,
249
- duration: undefined ,
248
+ style: " native " ,
249
+ duration: 123 ,
250
250
},
251
251
},
252
252
};
Original file line number Diff line number Diff line change 425
425
{
426
426
"text" : " native" ,
427
427
"name" : " default"
428
+ },
429
+ {
430
+ "text" : " \" native\" " ,
431
+ "name" : " example"
428
432
}
429
433
],
430
434
"docs" : " Configure the style." ,
437
441
{
438
442
"text" : " 1.2.3" ,
439
443
"name" : " since"
444
+ },
445
+ {
446
+ "text" : " 123" ,
447
+ "name" : " example"
440
448
}
441
449
],
442
450
"docs" : " Configure the duration." ,
Original file line number Diff line number Diff line change @@ -11,13 +11,15 @@ declare module '@capacitor/cli' {
11
11
*
12
12
* @since 1.0.0
13
13
* @default native
14
+ * @example "native"
14
15
*/
15
16
style ?: 'none' | 'native' ;
16
17
17
18
/**
18
19
* Configure the duration.
19
20
*
20
21
* @since 1.2.3
22
+ * @example 123
21
23
*/
22
24
duration ?: number ;
23
25
} ;
Original file line number Diff line number Diff line change @@ -155,19 +155,23 @@ describe('parse', () => {
155
155
expect ( p0 . docs ) . toBe ( `Configure the style.` ) ;
156
156
expect ( p0 . type ) . toBe ( `'none' | 'native' | undefined` ) ;
157
157
expect ( p0 . complexTypes ) . toHaveLength ( 0 ) ;
158
- expect ( p0 . tags ) . toHaveLength ( 2 ) ;
158
+ expect ( p0 . tags ) . toHaveLength ( 3 ) ;
159
159
expect ( p0 . tags [ 0 ] . name ) . toBe ( `since` ) ;
160
160
expect ( p0 . tags [ 0 ] . text ) . toBe ( `1.0.0` ) ;
161
161
expect ( p0 . tags [ 1 ] . name ) . toBe ( `default` ) ;
162
162
expect ( p0 . tags [ 1 ] . text ) . toBe ( `native` ) ;
163
+ expect ( p0 . tags [ 2 ] . name ) . toBe ( `example` ) ;
164
+ expect ( p0 . tags [ 2 ] . text ) . toBe ( `"native"` ) ;
163
165
164
166
const p1 = p . properties [ 1 ] ;
165
167
expect ( p1 . name ) . toBe ( `duration` ) ;
166
168
expect ( p1 . docs ) . toBe ( `Configure the duration.` ) ;
167
169
expect ( p1 . type ) . toBe ( `number | undefined` ) ;
168
170
expect ( p1 . complexTypes ) . toHaveLength ( 0 ) ;
169
- expect ( p1 . tags ) . toHaveLength ( 1 ) ;
171
+ expect ( p1 . tags ) . toHaveLength ( 2 ) ;
170
172
expect ( p1 . tags [ 0 ] . name ) . toBe ( `since` ) ;
171
173
expect ( p1 . tags [ 0 ] . text ) . toBe ( `1.2.3` ) ;
174
+ expect ( p1 . tags [ 1 ] . name ) . toBe ( `example` ) ;
175
+ expect ( p1 . tags [ 1 ] . text ) . toBe ( `123` ) ;
172
176
} ) ;
173
177
} ) ;
You can’t perform that action at this time.
0 commit comments