Skip to content

Commit

Permalink
Merge pull request #913 from nubolab-ffwd/renovate/vitest-monorepo
Browse files Browse the repository at this point in the history
chore(deps): update vitest monorepo to v0.34.1
  • Loading branch information
sfriedel authored Aug 2, 2023
2 parents 6dbe278 + b93f20d commit 21f10f9
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 101 deletions.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"test": "run-s test:*",
"test:dom": "vitest --run",
"test:ssr": "vitest -c vitest.ssr.config.ts --run",
"test": "vitest",
"prepublishOnly": "npm run package"
},
"dependencies": {
Expand All @@ -53,7 +51,7 @@
"@types/jsdom": "21.1.1",
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"@vitest/ui": "0.33.0",
"@vitest/ui": "0.34.1",
"autoprefixer": "10.4.14",
"eslint": "8.46.0",
"eslint-config-prettier": "8.9.0",
Expand Down Expand Up @@ -85,7 +83,7 @@
"typescript": "5.1.6",
"unist-util-visit": "5.0.0",
"unplugin-icons": "0.16.5",
"vitest": "0.33.0"
"vitest": "0.34.1"
},
"peerDependencies": {
"jsdom": "^16.4.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
Expand Down
70 changes: 35 additions & 35 deletions pnpm-lock.yaml

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

File renamed without changes.
4 changes: 2 additions & 2 deletions tests/dom/e2e.test.js → src/tests/dom/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ afterEach(async () => {
cleanup();
});

const testComponents = import.meta.glob('../../src/e2e/**/Test.svelte');
const testComponents = import.meta.glob('../../e2e/**/Test.svelte');

export const tests = Object.entries(testComponents).map(([name, mod]) => ({
name: name.replace('../../src/e2e/', ''),
name: name.replace('../../e2e/', ''),
module: mod
}));

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/ssr/e2e.test.js → src/tests/ssr/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { describe, it, expect, vi } from 'vitest';

vi.stubGlobal('navigator', { languages: [] });

const testComponents = import.meta.glob('../../src/e2e/**/Test.svelte');
const testComponents = import.meta.glob('../../e2e/**/Test.svelte');

export const tests = Object.entries(testComponents).map(([name, mod]) => ({
name: name.replace('../../src/e2e/', ''),
name: name.replace('../../e2e/', ''),
module: mod
}));

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import mdsvexConfig from './mdsvex.config.js';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/package').Config} */
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexConfig.extensions],

Expand Down
12 changes: 0 additions & 12 deletions tests/dom/__snapshots__/regression-tests.test.js.snap

This file was deleted.

12 changes: 0 additions & 12 deletions tests/ssr/__snapshots__/regression-tests.test.js.snap

This file was deleted.

19 changes: 13 additions & 6 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/// <reference types="vitest" />
import { sveltekit } from '@sveltejs/kit/vite';
import Icons from 'unplugin-icons/vite';
import { defineConfig } from 'vite';
import ssrResolvePlugin from './src/site/plugin';
import highlightPlugin from './utils/highlight-plugin';

/** @type {import('vite').UserConfig} */
const config = {
export default defineConfig({
plugins: [
ssrResolvePlugin(),
highlightPlugin(),
Expand All @@ -13,7 +14,13 @@ const config = {
compiler: 'svelte',
autoInstall: true
})
]
};

export default config;
],
test: {
environmentMatchGlobs: [
['src/tests/dom/**', 'jsdom'],
['src/tests/ssr/**', 'node']
],
include: ['src/tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
setupFiles: 'src/tests/setup.js'
}
});
11 changes: 0 additions & 11 deletions vitest.config.ts

This file was deleted.

15 changes: 0 additions & 15 deletions vitest.ssr.config.ts

This file was deleted.

0 comments on commit 21f10f9

Please sign in to comment.