Skip to content

Commit

Permalink
Stop in-source testing
Browse files Browse the repository at this point in the history
I couldn't find out how to make `import.meta.vitest` `undefined` with
`@vercel/ncc`.
  • Loading branch information
yykamei committed Feb 22, 2024
1 parent 2dc4dd0 commit 89a9bde
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
7 changes: 0 additions & 7 deletions src/Aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,3 @@ export class Aggregator {
return this.source.fetch();
}
}

if (import.meta.vitest) {
const { it, expect } = import.meta.vitest;
it("true", () => {
expect(true).toBe(true);
});
}
7 changes: 1 addition & 6 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
includeSource: ["src/**/*.{js,ts}"],
},
define: {
"import.meta.vitest": "undefined",
},
test: {},
});

0 comments on commit 89a9bde

Please sign in to comment.