diff options
Diffstat (limited to 'cli/diagnostics.rs')
-rw-r--r-- | cli/diagnostics.rs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs index 695330af3..da9a090c8 100644 --- a/cli/diagnostics.rs +++ b/cli/diagnostics.rs @@ -628,45 +628,4 @@ mod tests { let actual = diagnostics.to_string(); assert_eq!(strip_ansi_codes(&actual), "TS2552 [ERROR]: Cannot find name \'foo_Bar\'. Did you mean \'foo_bar\'?\nfoo_Bar();\n~~~~~~~\n at test.ts:8:1\n\n \'foo_bar\' is declared here.\n function foo_bar() {\n ~~~~~~~\n at test.ts:4:10"); } - - #[test] - fn test_unstable_suggestion() { - let value = json![ - { - "start": { - "line": 0, - "character": 17 - }, - "end": { - "line": 0, - "character": 21 - }, - "fileName": "file:///cli/tests/unstable_ts2551.ts", - "messageText": "Property 'ppid' does not exist on type 'typeof Deno'. Did you mean 'pid'?", - "sourceLine": "console.log(Deno.ppid);", - "relatedInformation": [ - { - "start": { - "line": 89, - "character": 15 - }, - "end": { - "line": 89, - "character": 18 - }, - "fileName": "asset:///lib.deno.ns.d.ts", - "messageText": "'pid' is declared here.", - "sourceLine": " export const pid: number;", - "category": 3, - "code": 2728 - } - ], - "category": 1, - "code": 2551 - } - ]; - let diagnostics: Diagnostic = serde_json::from_value(value).unwrap(); - let actual = diagnostics.to_string(); - assert_eq!(strip_ansi_codes(&actual), "TS2551 [ERROR]: Property \'ppid\' does not exist on type \'typeof Deno\'. \'Deno.ppid\' is an unstable API. Did you forget to run with the \'--unstable\' flag, or did you mean \'pid\'?\nconsole.log(Deno.ppid);\n ~~~~\n at file:///cli/tests/unstable_ts2551.ts:1:18\n\n \'pid\' is declared here.\n export const pid: number;\n ~~~\n at asset:///lib.deno.ns.d.ts:90:16"); - } } |