mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-09 17:04:30 +08:00
rework `onChild` to behave mostly like jQuery `.on` with selector. - we remove `currentTarget` from the `onChild` event handler because native events and jQuery events have different values for it - the jQuery `currentTarget` is available with `childTarget` in our events --------- Co-authored-by: Miodec <jack@monkeytype.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { defineConfig, UserWorkspaceConfig } from "vitest/config";
|
|
import { languageHashes } from "./vite-plugins/language-hashes";
|
|
import { envConfig } from "./vite-plugins/env-config";
|
|
|
|
const plugins = [
|
|
languageHashes({ skip: true }),
|
|
envConfig({ isDevelopment: true, clientVersion: "TESTING", env: {} }),
|
|
];
|
|
|
|
export const projects: UserWorkspaceConfig[] = [
|
|
{
|
|
test: {
|
|
name: { label: "unit", color: "blue" },
|
|
include: ["__tests__/**/*.spec.ts"],
|
|
exclude: ["__tests__/**/*.jsdom-spec.ts"],
|
|
environment: "happy-dom",
|
|
globalSetup: "__tests__/global-setup.ts",
|
|
setupFiles: ["__tests__/setup-tests.ts"],
|
|
},
|
|
plugins,
|
|
},
|
|
{
|
|
test: {
|
|
name: { label: "jsdom", color: "yellow" },
|
|
include: ["__tests__/**/*.jsdom-spec.ts"],
|
|
exclude: ["__tests__/**/*.spec.ts"],
|
|
environment: "happy-dom",
|
|
globalSetup: "__tests__/global-setup.ts",
|
|
setupFiles: ["__tests__/setup-jsdom.ts"],
|
|
},
|
|
plugins,
|
|
},
|
|
];
|
|
export default defineConfig({
|
|
test: {
|
|
projects: projects,
|
|
coverage: {
|
|
include: ["**/*.ts"],
|
|
},
|
|
deps: {
|
|
optimizer: {
|
|
web: {
|
|
include: ["@monkeytype/funbox"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|