Update Convex with no payload to be just like convex with payload but without payload
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { defineProject } from 'vitest/config';
|
||||
|
||||
const jsdomSetup = fileURLToPath(new URL('./setup-jsdom.ts', import.meta.url));
|
||||
|
||||
export const nodeProject = (name: string, include: string[]) =>
|
||||
defineProject({ test: { name, environment: 'node', include } });
|
||||
|
||||
export const jsdomProject = (name: string, include: string[]) =>
|
||||
defineProject({
|
||||
plugins: [react()],
|
||||
test: { name, environment: 'jsdom', include, setupFiles: [jsdomSetup] },
|
||||
});
|
||||
|
||||
export const convexProject = (name: string, include: string[]) =>
|
||||
defineProject({
|
||||
test: {
|
||||
name,
|
||||
environment: 'edge-runtime',
|
||||
include,
|
||||
server: { deps: { inline: ['convex-test'] } },
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@gib/vitest-config",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./setup-jsdom": "./setup-jsdom.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "git clean -xdf .cache .turbo node_modules",
|
||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@testing-library/jest-dom": "catalog:test",
|
||||
"@vitejs/plugin-react": "catalog:test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gib/prettier-config": "workspace:*",
|
||||
"@gib/tsconfig": "workspace:*",
|
||||
"@types/node": "catalog:",
|
||||
"prettier": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
"vitest": "catalog:test"
|
||||
},
|
||||
"prettier": "@gib/prettier-config"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom/vitest';
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "@gib/tsconfig/base.json",
|
||||
"compilerOptions": { "lib": ["ES2022", "dom", "dom.iterable"] },
|
||||
"include": ["."],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user