aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/test/utils/diagnotics
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-12-17 13:43:19 +0000
committerEdwin Cheng <[email protected]>2019-12-18 02:50:54 +0000
commitbb9c60d90863b21a0e981f00e354d02b0e9fb584 (patch)
treeda8702614f55f0511f92c41b6bf50c506aaac3a9 /editors/code/src/test/utils/diagnotics
parent63c59308e6ece788084374c4fc393576684992a7 (diff)
Use substr instead of endswith
Diffstat (limited to 'editors/code/src/test/utils/diagnotics')
-rw-r--r--editors/code/src/test/utils/diagnotics/rust.test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/code/src/test/utils/diagnotics/rust.test.ts b/editors/code/src/test/utils/diagnotics/rust.test.ts
index 9acd319b3..358325cc8 100644
--- a/editors/code/src/test/utils/diagnotics/rust.test.ts
+++ b/editors/code/src/test/utils/diagnotics/rust.test.ts
@@ -212,7 +212,7 @@ describe('mapRustDiagnosticToVsCode', () => {
212 assert.strictEqual( 212 assert.strictEqual(
213 diagnostic.message, 213 diagnostic.message,
214 [ 214 [
215 'can\'t compare `{integer}` with `&str`', 215 "can't compare `{integer}` with `&str`",
216 'the trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`', 216 'the trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`',
217 ].join('\n'), 217 ].join('\n'),
218 ); 218 );
@@ -229,8 +229,8 @@ describe('mapRustDiagnosticToVsCode', () => {
229 // The file url should be normal file 229 // The file url should be normal file
230 // Ignore the first part because it depends on vs workspace location 230 // Ignore the first part because it depends on vs workspace location
231 assert.strictEqual( 231 assert.strictEqual(
232 true, 232 location.uri.path.substr(-'src/main.rs'.length),
233 location.uri.toString().endsWith('src/main.rs'), 233 'src/main.rs',
234 ); 234 );
235 }); 235 });
236}); 236});