Setting up tests for my vscode extension for the first time and encountering an issue.
I copied and pasted the example from code.visualstudio's /working-with-extensions/testing-extension.
However, I'm facing an error when trying to call runTests:
error TS2345: Argument of type '{ extensionDevelopmentPath: string; extensionTestsPath: string; }' is not assignable to parameter of type 'TestOptions | ExplicitTestOptions'.
Object literal may only specify known properties, and 'extensionDevelopmentPath' does not exist in type 'TestOptions | ExplicitTestOptions'.
Here is the code snippet causing the error:
import * as path from 'path';
import { runTests } from 'vscode-test';
async function main() {
try {
const extensionDevelopmentPath = path.resolve(__dirname, '../../../');
const extensionTestsPath = path.resolve(__dirname, './suite/index');
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch(err) {
console.error('Failed to run tests.');
process.exit(1);
}
}
main();
Looking for assistance in identifying the mistake. Appreciate any help provided.