diff --git a/vscode/microsoft-kiota/.vscode-test.mjs b/vscode/microsoft-kiota/.vscode-test.mjs index 88d33ef4a7..1d1f6e941c 100644 --- a/vscode/microsoft-kiota/.vscode-test.mjs +++ b/vscode/microsoft-kiota/.vscode-test.mjs @@ -1,8 +1,14 @@ import { defineConfig } from '@vscode/test-cli'; export default defineConfig({ - files: 'out/test/**/*.test.js', - includeAll: true, - exclude: ["out/src/test/**/*.test.*", "**/dist"], - reporter: ["text", "html", "json-summary", "lcov"], + tests:[ + { + files: 'out/test/**/*.test.js' + } + ], + coverage: { + includeAll: true, + exclude: ["**/src/test", "**/dist"], + reporter: ["text", "html", "json-summary", "lcov"], + }, }); diff --git a/vscode/microsoft-kiota/.vscodeignore b/vscode/microsoft-kiota/.vscodeignore index fd9b279b75..0f6f2bb0a1 100644 --- a/vscode/microsoft-kiota/.vscodeignore +++ b/vscode/microsoft-kiota/.vscodeignore @@ -14,4 +14,5 @@ vsc-extension-quickstart.md .kiotabin/ .vsix images/samples/ +.vscode-test coverage/ diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index a0d55d4bbd..08900b203f 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -463,7 +463,7 @@ "watch-tests": "tsc -p . -w --outDir out", "pretest": "npm run compile && npm run compile-tests && npm run lint", "lint": "eslint", - "test": "npm run pretest && vscode-test", + "test": "vscode-test", "test-with-coverage": "npm run pretest && vscode-test --coverage" }, "devDependencies": { diff --git a/vscode/microsoft-kiota/src/test/suite/extension.test.ts b/vscode/microsoft-kiota/src/test/suite/commands/filterDescriptionCommand.test.ts similarity index 79% rename from vscode/microsoft-kiota/src/test/suite/extension.test.ts rename to vscode/microsoft-kiota/src/test/suite/commands/filterDescriptionCommand.test.ts index 4ce5e0fd3b..1f93fab80a 100644 --- a/vscode/microsoft-kiota/src/test/suite/extension.test.ts +++ b/vscode/microsoft-kiota/src/test/suite/commands/filterDescriptionCommand.test.ts @@ -4,9 +4,9 @@ import assert from "assert"; import * as sinon from "sinon"; import * as vscode from 'vscode'; -import * as filterModule from "../../commands/open-api-tree-view/filterDescriptionCommand"; -import * as treeModule from "../../openApiTreeProvider"; -import * as stepsModule from "../../steps"; +import * as filterModule from "../../../commands/open-api-tree-view/filterDescriptionCommand"; +import * as treeModule from "../../../openApiTreeProvider"; +import * as stepsModule from "../../../steps"; suite('Extension Test Suite', () => { @@ -17,11 +17,6 @@ suite('Extension Test Suite', () => { sanbox.restore(); }); - test('Sample test', () => { - assert.strictEqual(-1, [1, 2, 3].indexOf(5)); - assert.strictEqual(-1, [1, 2, 3].indexOf(0)); - }); - test('test function getName of filterDescriptionCommand', () => { var treeProvider = sinon.createStubInstance(treeModule.OpenApiTreeProvider); const filterDescriptionCommand = new filterModule.FilterDescriptionCommand(treeProvider);