Skip to content

Commit b3e6db1

Browse files
committed
Use substr instead of endswith
1 parent 91ed12c commit b3e6db1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editors/code/src/test/utils/diagnotics/rust.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ describe('mapRustDiagnosticToVsCode', () => {
229229
// The file url should be normal file
230230
// Ignore the first part because it depends on vs workspace location
231231
assert.strictEqual(
232-
true,
233-
location.uri.toString().endsWith('src/main.rs'),
232+
location.uri.path.substr(-'src/main.rs'.length),
233+
'src/main.rs',
234234
);
235235
});
236236
});

0 commit comments

Comments
 (0)