Skip to content

Commit

Permalink
Finalized failing test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Jan 14, 2022
1 parent ea2c290 commit d954948
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tests/cases/fourslash/importFixesWithExistingDottedRequire.ts
@@ -1,14 +1,21 @@
/// <reference path="./fourslash.ts" />

// @allowJs: true
// @Filename: /library.js
// @module: commonjs
// @checkJs: true

// @Filename: ./library.js
//// module.exports.aaa = function() {}
//// module.exports.bbb = function() {}

// @Filename: /foo.js
// @Filename: ./foo.js
//// var aaa = require("./library.js").aaa;
//// aaa();
//// /**/bbb
//// /*$*/bbb

goTo.marker();
verify.getAndApplyCodeFix(ts.Diagnostics.Cannot_find_name_0.code);
goTo.marker("$")
verify.codeFixAvailable([
{ description: "Import 'bbb' from module \"./library.js\"" },
{ description: "Ignore this error message" },
{ description: "Disable checking for this file" },
{ description: "Convert to ES module" },
]);

0 comments on commit d954948

Please sign in to comment.