Skip to content

Commit

Permalink
[fix] use .ts extension for tests when using TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Mar 16, 2022
1 parent 2d6f0d2 commit 42d9521
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/perfect-mayflies-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

[fix] use .ts extension for tests when using TypeScript
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { expect, test } from '@playwright/test';

test('about page has expected h1', async ({ page }) => {
await page.goto('/about');
expect(await page.textContent('h1')).toBe('About this app');
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { expect, test } from '@playwright/test';

test('index page has expected h1', async ({ page }) => {
await page.goto('/');
expect(await page.textContent('h1')).toBe('Welcome to SvelteKit');
});
2 changes: 1 addition & 1 deletion packages/create-svelte/shared/+playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"@playwright/test": "^1.19.1"
"@playwright/test": "^1.20.0"
},
"scripts": {
"test": "playwright test"
Expand Down

0 comments on commit 42d9521

Please sign in to comment.