@@ -25,7 +25,7 @@ const logger = new NoopLogger()
2525describe ( 'register()' , ( ) => {
2626 it ( 'should initialize one connection with each workspace folder if the server is multi-root capable' , async ( ) => {
2727 const sourcegraph = createMockSourcegraphAPI ( )
28- sourcegraph . workspace . roots = [ { uri : 'git://repo1?rev' } , { uri : 'git://repo2?rev' } ]
28+ sourcegraph . workspace . roots = [ { uri : new URL ( 'git://repo1?rev' ) } , { uri : new URL ( 'git://repo2?rev' ) } ]
2929 const server = {
3030 initialize : sinon . spy ( ( params : InitializeParams ) : InitializeResult => ( { capabilities : { } } ) ) ,
3131 }
@@ -49,7 +49,7 @@ describe('register()', () => {
4949 } )
5050 it ( 'should initialize one connection for each workspace folder if the server is not multi-root capable' , async ( ) => {
5151 const sourcegraph = createMockSourcegraphAPI ( )
52- sourcegraph . workspace . roots = [ { uri : 'git://repo1?rev' } , { uri : 'git://repo2?rev' } ]
52+ sourcegraph . workspace . roots = [ { uri : new URL ( 'git://repo1?rev' ) } , { uri : new URL ( 'git://repo2?rev' ) } ]
5353 const server = {
5454 initialize : sinon . spy ( ( params : InitializeParams ) : InitializeResult => ( { capabilities : { } } ) ) ,
5555 }
@@ -80,7 +80,7 @@ describe('register()', () => {
8080 } )
8181 it ( 'should close a connection when a workspace folder is closed' , async ( ) => {
8282 const sourcegraph = createMockSourcegraphAPI ( )
83- sourcegraph . workspace . roots = [ { uri : 'git://repo1?rev' } , { uri : 'git://repo2?rev' } ]
83+ sourcegraph . workspace . roots = [ { uri : new URL ( 'git://repo1?rev' ) } , { uri : new URL ( 'git://repo2?rev' ) } ]
8484 const server = {
8585 initialize : sinon . spy ( ( params : InitializeParams ) : InitializeResult => ( { capabilities : { } } ) ) ,
8686 }
@@ -99,7 +99,7 @@ describe('register()', () => {
9999 sinon . assert . calledOnce ( createConnection . returnValues [ 0 ] . unsubscribe )
100100 } )
101101 it ( 'should register a references provider if the server reports the references capability' , async ( ) => {
102- const repoRoot = 'https://sourcegraph.test/repo@rev/-/raw/'
102+ const repoRoot = new URL ( 'https://sourcegraph.test/repo@rev/-/raw/' )
103103 const server = {
104104 initialize : sinon . spy (
105105 ( params : InitializeParams ) : InitializeResult => ( {
@@ -180,7 +180,7 @@ describe('register()', () => {
180180 ] )
181181 } )
182182 it ( 'should register a definition provider if the server reports the definition capability' , async ( ) => {
183- const repoRoot = 'https://sourcegraph.test/repo@rev/-/raw/'
183+ const repoRoot = new URL ( 'https://sourcegraph.test/repo@rev/-/raw/' )
184184 const server = {
185185 initialize : sinon . spy (
186186 ( params : InitializeParams ) : InitializeResult => ( {
@@ -257,7 +257,7 @@ describe('register()', () => {
257257 ] )
258258 } )
259259 it ( 'should register a hover provider if the server reports the hover capability' , async ( ) => {
260- const repoRoot = 'https://sourcegraph.test/repo@rev/-/raw/'
260+ const repoRoot = new URL ( 'https://sourcegraph.test/repo@rev/-/raw/' )
261261 const server = {
262262 initialize : sinon . spy (
263263 async ( params : InitializeParams ) : Promise < InitializeResult > => ( {
0 commit comments