@@ -42,32 +42,36 @@ describe('SchemaService', function () {
4242
4343 it ( 'assigns schemas to the yaml extension' , async function ( ) {
4444 const stub = sinon . stub ( )
45+ const fooUri = vscode . Uri . parse ( '/foo' )
46+ const barUri = vscode . Uri . parse ( '/bar' )
4547 fakeYamlExtension . assignSchema = stub
4648 service . registerMapping ( {
47- uri : vscode . Uri . parse ( '/foo' ) ,
49+ uri : fooUri ,
4850 type : 'yaml' ,
4951 schema : 'cfn' ,
5052 } )
5153 service . registerMapping ( {
52- uri : vscode . Uri . parse ( '/bar' ) ,
54+ uri : barUri ,
5355 type : 'yaml' ,
5456 schema : 'sam' ,
5557 } )
5658 await service . processUpdates ( )
57- assert ( stub . firstCall . calledWithExactly ( vscode . Uri . file ( '/foo' ) , cfnSchema ) )
58- assert ( stub . secondCall . calledWithExactly ( vscode . Uri . file ( '/bar' ) , samSchema ) )
59+ assert . ok ( stub . firstCall . args [ 0 ] )
60+ assert ( stub . firstCall . calledWithExactly ( fooUri , cfnSchema ) )
61+ assert ( stub . secondCall . calledWithExactly ( barUri , samSchema ) )
5962 } )
6063
6164 it ( 'removes schemas from the yaml extension' , async function ( ) {
6265 const stub = sinon . stub ( )
66+ const fooUri = vscode . Uri . parse ( '/foo' )
6367 fakeYamlExtension . removeSchema = stub
6468 service . registerMapping ( {
65- uri : vscode . Uri . parse ( '/foo' ) ,
69+ uri : fooUri ,
6670 type : 'yaml' ,
6771 schema : undefined ,
6872 } )
6973 await service . processUpdates ( )
70- assert ( stub . calledOnceWithExactly ( vscode . Uri . file ( '/foo' ) ) )
74+ assert ( stub . calledOnceWithExactly ( fooUri ) )
7175 } )
7276
7377 it ( 'registers schemas to json configuration' , async function ( ) {
0 commit comments