I did check a dozen of posts before opening this one, but unfortunately I haven't found any solution.
Description
I have a small JS project, been using VSCode (v 1.62.2) to write the code.
In one of the projects file, called object.js (commonJS file), I have:
module.exports = {
waitForFirstTariffToBecomeVisible() {
// code of the method
}
}
In a test file called test.js (commonJS file), I'm importing the object.js:
import { page } from '../objectRepository/pages/object';
OR
var page = require("../objectRepository/pages/object");
describe('Suite name', () => {
it('Test case name', () => {
page.waitForFirstTariffToBecomeVisible();
})
});
Problem
VSCode doesn't show me the method name, available on the object I'm importing, even if the test is still executing and does what it should:
As I'm presuming it has to do also with the settings from tsconfig.json, this is what I have here:
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"allowJs": true,
"baseUrl": "../node_modules",
"types": [
"cypress"
],
"noEmit": true,
"allowSyntheticDefaultImports": true
},
"include": [
"**/*.*"
]
}
Thanks