Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cli/tsc/97_ts_host.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ const CACHE_URL_PREFIX = "cache:///";
/** Diagnostics that are intentionally ignored when compiling TypeScript in
* Deno, as they provide misleading or incorrect information. */
const IGNORED_DIAGNOSTICS = [
// TS1149: File name '...' differs from already included file name '...' only
// in casing.
1149,
// TS1261: File name '...' differs from already included file name '...' only
// in casing.
1261,
// TS1452: 'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`.
// We specify the resolution mode to be CommonJS for some npm files and this
// diagnostic gets generated even though we're using custom module resolution.
Expand Down
18 changes: 18 additions & 0 deletions tests/integration/lsp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11206,6 +11206,24 @@ fn lsp_root_with_global_reference_types() {
assert_eq!(json!(diagnostics.all()), json!([]));
}

#[test]
#[timeout(300_000)]
fn lsp_file_casing_no_diagnostic() {
let context = TestContextBuilder::new()
.use_http_server()
.use_temp_cwd()
.build();
let temp_dir = context.temp_dir();
temp_dir.write("other.ts", "");
temp_dir.write("Other.ts", "");
let file = temp_dir.source_file("file.ts", "import \"./Other.ts\";\n");
let mut client = context.new_lsp_command().build();
client.initialize_default();
// There shouldn't be a TS1149 diagnostic.
let diagnostics = client.did_open_file(&file);
assert_eq!(json!(diagnostics.all()), json!([]));
}

#[test]
#[timeout(300_000)]
fn lsp_diagnostics_refresh_dependents() {
Expand Down
Empty file.
4 changes: 4 additions & 0 deletions tests/specs/check/file_casing/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"args": "check --quiet main.ts",
"output": ""
}
2 changes: 2 additions & 0 deletions tests/specs/check/file_casing/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "./other.ts";
import "./Other.ts";
Empty file.
Loading