diff --git a/testing/tests/developing.spec.ts b/testing/tests/developing.spec.ts index ded6dbf4abbe..3fc247d7a97c 100644 --- a/testing/tests/developing.spec.ts +++ b/testing/tests/developing.spec.ts @@ -1,6 +1,8 @@ const { test, expect } = require("@playwright/test"); const got = require("got"); +export {}; + const DEV_BASE_URL = process.env.DEVELOPING_DEV_BASE_URL || "http://localhost:3000"; diff --git a/testing/tests/headless.auth.spec.ts b/testing/tests/headless.auth.spec.ts index 4cc73dee3a3c..c4fe879ff86e 100644 --- a/testing/tests/headless.auth.spec.ts +++ b/testing/tests/headless.auth.spec.ts @@ -1,5 +1,7 @@ const { test, expect } = require("@playwright/test"); +export {}; + function testURL(pathname = "/") { const PORT = parseInt(process.env.SERVER_PORT || "5042"); return `http://localhost:${PORT}${pathname}`; diff --git a/testing/tests/headless.index.spec.ts b/testing/tests/headless.index.spec.ts index c23a9da668f9..80212f1ce548 100644 --- a/testing/tests/headless.index.spec.ts +++ b/testing/tests/headless.index.spec.ts @@ -1,5 +1,7 @@ const { test, expect } = require("@playwright/test"); +export {}; + function testURL(pathname = "/") { const PORT = parseInt(process.env.SERVER_PORT || "5042"); return `http://localhost:${PORT}${pathname}`; diff --git a/testing/tests/headless.search.spec.ts b/testing/tests/headless.search.spec.ts index 082cb220f602..a2291bd37777 100644 --- a/testing/tests/headless.search.spec.ts +++ b/testing/tests/headless.search.spec.ts @@ -1,5 +1,7 @@ const { test, expect } = require("@playwright/test"); +export {}; + function testURL(pathname = "/") { return "http://localhost:5042" + pathname; } diff --git a/testing/tests/headless.sitesearch.spec.ts b/testing/tests/headless.sitesearch.spec.ts index 3b2e8840b0f4..64b87da1aa4b 100644 --- a/testing/tests/headless.sitesearch.spec.ts +++ b/testing/tests/headless.sitesearch.spec.ts @@ -1,5 +1,7 @@ const { test, expect } = require("@playwright/test"); +export {}; + function testURL(pathname = "/") { return "http://localhost:5042" + pathname; } diff --git a/testing/tests/index.test.ts b/testing/tests/index.test.ts index d97287a77ce3..e5a44cdecf91 100644 --- a/testing/tests/index.test.ts +++ b/testing/tests/index.test.ts @@ -1591,8 +1591,7 @@ test("home page should have a /index.json file with pullRequestsData", () => { const builtFolder = path.join(buildRoot, "en-us"); const jsonFile = path.join(builtFolder, "index.json"); - // @ts-ignore - const { hyData: { recentContributions } = {} } = JSON.parse( + const { hyData: { recentContributions = {} } = {} } = JSON.parse( fs.readFileSync(jsonFile, "utf-8") ); expect(recentContributions.items.length).toBeGreaterThan(0); diff --git a/testing/tsconfig.json b/testing/tsconfig.json new file mode 100644 index 000000000000..d7b4f968356b --- /dev/null +++ b/testing/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.json", + "include": ["tests"], + "compilerOptions": { + "noEmit": true + } +}