Skip to content

Commit ff873bf

Browse files
gioboawmertens
authored andcommitted
fix: unit tests 🐻
1 parent 47a0b13 commit ff873bf

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

packages/qwik/src/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Protect against duplicate imports
33
//////////////////////////////////////////////////////////////////////////////////////////
44
import { version } from './version';
5-
if ((globalThis as any).__qwik) {
5+
if ((globalThis as any).__qwik && !(globalThis as any).__qwik_testing) {
66
throw new Error(
77
`Qwik version ${(globalThis as any).__qwik} already imported while importing ${version}. Verify external vs bundled imports etc.`
88
);

packages/qwik/src/optimizer/src/plugins/vite.unit.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const noExternal = [
5050
'@qwik.dev/core/internal',
5151
'@qwik.dev/core/server',
5252
'@qwik.dev/core/build',
53-
'@qwik.dev/router',
5453
];
5554

5655
const excludeDeps = [
@@ -61,7 +60,6 @@ const excludeDeps = [
6160
'@qwik.dev/core/jsx-dev-runtime',
6261
'@qwik.dev/core/build',
6362
'@qwik-client-manifest',
64-
'@qwik.dev/router',
6563
'@builder.io/qwik',
6664
'@builder.io/qwik-city',
6765
];

starters/dev-server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ function favicon(_: Request, res: Response) {
327327
}
328328

329329
async function main() {
330+
(globalThis as any).__qwik_testing = true;
330331
const partytownPath = resolve(
331332
startersDir,
332333
"..",

starters/e2e/e2e.use-id.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test, expect, Locator } from "@playwright/test";
1+
import { test, expect } from "@playwright/test";
22

33
test.describe("use-id", () => {
44
test.beforeEach(async ({ page }) => {

0 commit comments

Comments
 (0)