microsoft / microsoft/TypeScript

[Question or bug] One fourslash test file might be wrong.

Open
#41,413 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Investigation
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TypeScript Version: 4.2.dev

Search Terms: fourslash

Code

File name is completionForStringLiteralNonrelativeImport15.ts

// @Filename: tests/test0.ts
//// import * as foo1 from "//m*import_as0*/            // <---- I think this should be "/m/*import_as0*/ or something else
...
verify.completions({ marker: test.markerNames(), exact: ["/module1", "/module2"], isNewIdentifierLocation: true });

Expected behavior:

Actual behavior:
it passes, always, even when I change "exact" array.

Playground Link:

Related Issues:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/cases/fourslash/completionForStringLiteralNonrelativeImport15.ts and inspect how its verify.completions call handles the marker and exact array. Run this fourslash test, then change the expected module names to confirm whether the assertion is being enforced. Done means the test accurately represents the intended completion behavior and fails when its expected results are incorrect.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.