Skip to content

Commit

Permalink
Improve coverage configs
Browse files Browse the repository at this point in the history
  • Loading branch information
fey101 committed Oct 9, 2024
1 parent 60fb94b commit 6812c03
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
14 changes: 10 additions & 4 deletions vscode/microsoft-kiota/.vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -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"],
},
});
2 changes: 1 addition & 1 deletion vscode/microsoft-kiota/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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);
Expand Down

0 comments on commit 6812c03

Please sign in to comment.