File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as assert from 'assert'
22import { KnownProps } from 'editorconfig'
3+ import { TextEditorOptions } from 'vscode'
34
45import * as api from '../../api'
56
67suite ( 'EditorConfig extension' , ( ) => {
78 // Defines a Mocha unit test
89 test ( 'api.fromEditorConfig' , ( ) => {
9- ; [
10+ const scenarios : {
11+ config : KnownProps
12+ defaults : TextEditorOptions
13+ expected : TextEditorOptions
14+ } [ ] = [
1015 {
1116 config : {
1217 indent_style : 'tab' ,
@@ -196,16 +201,20 @@ suite('EditorConfig extension', () => {
196201 tabSize : 2 ,
197202 } ,
198203 } ,
199- ] . forEach ( scenario => {
204+ ]
205+ scenarios . forEach ( scenario => {
200206 assert . deepStrictEqual (
201- api . fromEditorConfig ( scenario . config as KnownProps , scenario . defaults ) ,
207+ api . fromEditorConfig ( scenario . config , scenario . defaults ) ,
202208 scenario . expected ,
203209 )
204210 } )
205211 } )
206212
207213 test ( 'api.toEditorConfig' , ( ) => {
208- ; [
214+ const scenarios : {
215+ options : TextEditorOptions
216+ expected : KnownProps
217+ } [ ] = [
209218 {
210219 options : {
211220 insertSpaces : true ,
@@ -256,7 +265,8 @@ suite('EditorConfig extension', () => {
256265 tab_width : 4 ,
257266 } ,
258267 } ,
259- ] . forEach ( scenario => {
268+ ]
269+ scenarios . forEach ( scenario => {
260270 assert . deepStrictEqual (
261271 api . toEditorConfig ( scenario . options ) ,
262272 scenario . expected ,
You can’t perform that action at this time.
0 commit comments