Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Aug 11, 2016 · 1 comment · Fixed by #10303
Closed

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

ghost opened this issue Aug 11, 2016 · 1 comment · Fixed by #10303

Comments

@ghost
Copy link

ghost commented Aug 11, 2016

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.

@ghost
Copy link
Author

ghost commented Aug 12, 2016

Looking at the console it looks like we are getting 500 (Internal Server Error) for tests/baselines/local/library-reference-1.errors.txt, tests/baselines/library-reference-1.errors.txt, tests/baselines/local/library-reference-1.trace.json, and tests/baselines/local/library-reference-1.js. Not sure how this is related to the problem though.
EDIT: Upon further inspection it looks like webTestServer.ts is intentionally giving "500" errors for for files that haven't been found. We should probably use 404 instead.

@ghost ghost mentioned this issue Aug 12, 2016
@ghost ghost closed this as completed in #10303 Aug 12, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants