Skip to content

Commit

Permalink
Add files and config for npm test
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr committed Oct 24, 2024
1 parent 3f70ff5 commit d97382c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions eng/packages/http-client-csharp/emitter/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
environment: "node",
isolate: false,
coverage: {
reporter: ["cobertura", "json", "text"],
},
outputFile: {
junit: "./test-results.xml",
},
exclude: ["node_modules", "dist/test"],
},
server: {
watch: {
ignored: [],
},
},
});
2 changes: 1 addition & 1 deletion eng/packages/http-client-csharp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build:emitter": "tsc -p ./emitter/tsconfig.build.json",
"build:generator": "dotnet build ./generator && copyfiles -u 5 ./node_modules/@typespec/http-client-csharp/dist/generator/Microsoft.Generator.CSharp.runtimeconfig.json ./dist/generator",
"build": "npm run build:emitter && npm run build:generator",
"test:emitter": "vitest run -c ./emitter/vitest.config.ts",
"test:emitter": "vitest run -c ./emitter/vitest.config.ts --passWithNoTests",
"test:generator": "dotnet test ./generator --logger \"trx;LogFileName=debug.trx\"",
"test": "npm run test:generator && npm run test:emitter",
"lint": "eslint . --max-warnings=0",
Expand Down

0 comments on commit d97382c

Please sign in to comment.