moved and renamed playwright tests

This commit is contained in:
waltem01 2023-11-23 13:24:38 +01:00
parent 0ee1a56446
commit 2aabb066b8
3 changed files with 3 additions and 8 deletions

View File

@ -5,7 +5,7 @@ const config: PlaywrightTestConfig = {
command: 'npm run build && npm run preview',
port: 4173
},
testDir: 'tests',
testDir: 'src/playwright',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
};

View File

@ -1,6 +0,0 @@
import { expect, test } from '@playwright/test';
test('index page has expected h1', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
});

View File

@ -4,6 +4,7 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
include: ['src/**/*.{test,spec}.{js,ts}'],
exclude: ['src/playwright']
}
});