Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update conformance test
  • Loading branch information
sheetalkamat committed May 13, 2024
commit 50d79acd4946efd9b54d0bba7fdb7bff60819f1e
15 changes: 15 additions & 0 deletions tests/baselines/reference/typingsLookup3.errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/a.ts(1,23): error TS2688: Cannot find type definition file for 'JqUeRy'.


==== /tsconfig.json (0 errors) ====
{ "files": "a.ts" }

==== /a.ts (1 errors) ====
/// <reference types="JqUeRy" />
~~~~~~
!!! error TS2688: Cannot find type definition file for 'JqUeRy'.
$.x;

==== /node_modules/@types/jquery/index.d.ts (0 errors) ====
declare var $: { x: any };

12 changes: 8 additions & 4 deletions tests/baselines/reference/typingsLookup3.trace.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[
"File '/package.json' does not exist.",
"======== Resolving type reference directive 'jquery', containing file '/a.ts', root directory '/node_modules/@types'. ========",
"======== Resolving type reference directive 'JqUeRy', containing file '/a.ts', root directory '/node_modules/@types'. ========",
"Resolving with primary search path '/node_modules/@types'.",
"Looking up in 'node_modules' folder, initial location '/'.",
"Searching all ancestor node_modules directories for preferred extensions: Declaration.",
"File '/node_modules/JqUeRy.d.ts' does not exist.",
"File '/node_modules/@types/JqUeRy.d.ts' does not exist.",
"======== Type reference directive 'JqUeRy' was not resolved. ========",
"======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========",
"Resolving with primary search path '/node_modules/@types'.",
"File '/node_modules/@types/jquery/package.json' does not exist.",
"File '/node_modules/@types/jquery/index.d.ts' exists - use it as a name resolution result.",
Expand All @@ -10,9 +17,6 @@
"File '/node_modules/@types/package.json' does not exist.",
"File '/node_modules/package.json' does not exist.",
"File '/package.json' does not exist according to earlier cached lookups.",
"======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts'. ========",
"Resolution for type reference directive 'jquery' was found in cache from location '/'.",
"======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ========",
"File '/.ts/package.json' does not exist.",
"File '/package.json' does not exist according to earlier cached lookups.",
"======== Resolving module '@typescript/lib-es5' from '/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
Expand Down
2 changes: 2 additions & 0 deletions tests/baselines/reference/typingsLookup3.types
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/// <reference types="JqUeRy" />
$.x;
>$.x : any
> : ^^^
>$ : { x: any; }
> : ^^^^^^^^^^^
>x : any
Expand All @@ -14,4 +15,5 @@ declare var $: { x: any };
>$ : { x: any; }
> : ^^^^^ ^^^
>x : any
> : ^^^

2 changes: 1 addition & 1 deletion tests/cases/conformance/typings/typingsLookup3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @traceResolution: true
// @noImplicitReferences: true
// @currentDirectory: /
// This tests that `types` references are automatically lowercased.
// This tests that `types` references are not lowercased.

// @filename: /tsconfig.json
{ "files": "a.ts" }
Expand Down