File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 55import * as sinon from 'sinon' ;
66import * as chai from 'chai' ;
77import * as sinonChai from 'sinon-chai' ;
8+ import * as path from 'path' ;
89import * as SchemaService from '../src/languageservice/services/yamlSchemaService' ;
910import { parse } from '../src/languageservice/parser/yamlParser07' ;
1011
@@ -107,8 +108,9 @@ describe('YAML Schema Service', () => {
107108
108109 expect ( requestServiceMock ) . calledTwice ;
109110 if ( process . platform === 'win32' ) {
110- expect ( requestServiceMock ) . calledWithExactly ( 'file:///d%3A/schema.json' ) ;
111- expect ( requestServiceMock ) . calledWithExactly ( 'file:///d%3A/schema.json#/definitions/schemaArray' ) ;
111+ const driveLetter = path . parse ( __dirname ) . root . split ( ':' ) [ 0 ] . toLowerCase ( ) ;
112+ expect ( requestServiceMock ) . calledWithExactly ( `file:///${ driveLetter } %3A/schema.json` ) ;
113+ expect ( requestServiceMock ) . calledWithExactly ( `file:///${ driveLetter } %3A/schema.json#/definitions/schemaArray` ) ;
112114 } else {
113115 expect ( requestServiceMock ) . calledWithExactly ( 'file:///schema.json' ) ;
114116 expect ( requestServiceMock ) . calledWithExactly ( 'file:///schema.json#/definitions/schemaArray' ) ;
You can’t perform that action at this time.
0 commit comments