Skip to content

library-reference-1.ts fails with runtests-browser #10295

Closed
@ghost

Description

gulp runtests-browser --browser chrome --test library-reference-1.ts breaks.
From the local library-reference-1.trace.json:

[
    "======== Resolving type reference directive 'jquery', containing file '//src/consumer.ts', root directory 'types'. ========",
    "Resolving with primary search path 'types'",
    "File 'types/jquery/package.json' does not exist.",
    "File 'types/jquery/index.d.ts' does not exist.",
    "Looking up in 'node_modules' folder, initial location '//src/'",
    "File '//src/node_modules/jquery.ts' does not exist.",
    "File '//src/node_modules/jquery.d.ts' does not exist.",
    "File '//src/node_modules/jquery/package.json' does not exist.",
    "File '//src/node_modules/jquery/index.ts' does not exist.",
    "File '//src/node_modules/jquery/index.d.ts' does not exist.",
    "File '//src/node_modules/@types/jquery.ts' does not exist.",
    "File '//src/node_modules/@types/jquery.d.ts' does not exist.",
    "File '//src/node_modules/@types/jquery/package.json' does not exist.",
    "File '//src/node_modules/@types/jquery/index.ts' does not exist.",
    "File '//src/node_modules/@types/jquery/index.d.ts' does not exist.",
    "======== Type reference directive 'jquery' was not resolved. ========"
]

The correct trace should be:

[
    "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory 'types'. ========",
    "Resolving with primary search path 'types'",
    "File 'types/jquery/package.json' does not exist.",
    "File 'types/jquery/index.d.ts' exist - use it as a name resolution result.",
    "======== Type reference directive 'jquery' was successfully resolved to 'types/jquery/index.d.ts', primary: true. ========",
    "======== Resolving type reference directive 'jquery', containing file '/src/__inferred type names__.ts', root directory 'types'. ========",
    "Resolving with primary search path 'types'",
    "File 'types/jquery/package.json' does not exist.",
    "File 'types/jquery/index.d.ts' exist - use it as a name resolution result.",
    "======== Type reference directive 'jquery' was successfully resolved to 'types/jquery/index.d.ts', primary: true. ========"
]

Since // @filename: /src/types/jquery/index.d.ts is explicitly declared to exist in the test,
there must be some error in the mock file system when run in the browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions