Skip to content

Commit

Permalink
test(generate): Use vitest in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Feb 11, 2024
1 parent 3f77ffd commit 80f9681
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should print YAML 1`] = `
"---
Expand Down
1 change: 1 addition & 0 deletions packages/generate/integration/esm/__tests__/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import execa from "execa";
import { dirname, join } from "node:path";
import { test, expect } from "vitest";

const testDir = dirname(__dirname);

Expand Down
3 changes: 0 additions & 3 deletions packages/generate/integration/jest.config.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should print YAML 1`] = `
"---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import execa from "execa";
import { dirname, join } from "node:path";
import { installPackage } from "@kosko/test-utils";
import { beforeAll, beforeEach, test, expect } from "vitest";

const testDir = dirname(__dirname);
let result: execa.ExecaReturnValue;
Expand Down
4 changes: 3 additions & 1 deletion packages/generate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@kosko/build-scripts": "workspace:^",
"@kosko/jest-preset": "workspace:^",
"@kosko/test-utils": "workspace:^",
"@kosko/vitest-config": "workspace:^",
"@types/bl": "^5.0.2",
"@types/js-yaml": "^4.0.5",
"@types/micromatch": "^4.0.2",
Expand All @@ -65,7 +66,8 @@
"execa": "^5.1.1",
"kubernetes-models": "^4.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^1.2.2"
},
"jest": {
"preset": "@kosko/jest-preset"
Expand Down
1 change: 1 addition & 0 deletions packages/generate/vitest.config.integration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { integration as default } from "@kosko/vitest-config";
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80f9681

Please sign in to comment.