Skip to content

Commit 4162047

Browse files
refactor: address comments.
1 parent dea7503 commit 4162047

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

playwright/app.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { expect, test } from '@playwright/test'
22
import type { Page } from '@playwright/test'
33

4+
const webServerMode = process.env.PLAYWRIGHT_WEB_SERVER_MODE ?? 'dev'
5+
const appEntryPath = webServerMode === 'preview' ? '/index.html' : '/src/index.html'
6+
47
const waitForInitialRender = async (page: Page) => {
5-
await page.goto('/')
8+
await page.goto(appEntryPath)
69
await expect(page.getByRole('heading', { name: '@knighted/develop' })).toBeVisible()
710
await expect(page.locator('#status')).toHaveText('Rendered')
811
await expect(page.locator('#cdn-loading')).toHaveAttribute('hidden', '')

src/type-diagnostics.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const ignoredTypeDiagnosticCodes = new Set([2318, 6053])
2+
13
export const createTypeDiagnosticsController = ({
24
cdnImports,
35
importFromCdnWithFallback,
@@ -88,8 +90,7 @@ export const createTypeDiagnosticsController = ({
8890
}
8991

9092
const shouldIgnoreTypeDiagnostic = diagnostic => {
91-
const ignoredCodes = new Set([2318, 6053])
92-
return ignoredCodes.has(diagnostic.code)
93+
return ignoredTypeDiagnosticCodes.has(diagnostic.code)
9394
}
9495

9596
const normalizeVirtualFileName = fileName =>

0 commit comments

Comments
 (0)