<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.32.1]</li>
<li>Operating System: [All]</li>
<li>Browser: [All]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto"><a href="https://github.com/iffa/playwright-tsconfig-extends-array">https://github.com/iffa/playwright-tsconfig-extends-array</a></p>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>npm run test</li>
<li>Fails</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">Should successfully parse tsconfig.json and run tests.</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Fails to parse tsconfig.json, since it expects <code class="notranslate">extends</code> to be a string, when in TypeScript 5.0 it can also be an Array.</p>
<p dir="auto"><a href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#supporting-multiple-configuration-files-in-extends" rel="nofollow">https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#supporting-multiple-configuration-files-in-extends</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; playwright-tsconfig-extends-array@1.0.0 test
&gt; npx playwright test

TypeError: The &quot;path&quot; argument must be of type string. Received an instance of Array
    at new NodeError (node:internal/errors:399:5)
    at validateString (node:internal/validators:163:11)
    at Object.join (node:path:1172:7)
    at loadTsconfig (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/third_party/tsconfig-loader.js:107:35)
    at loadSyncDefault (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/third_party/tsconfig-loader.js:60:18)
    at tsConfigLoader (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/third_party/tsconfig-loader.js:42:22)
    at loadAndValidateTsconfigForFile (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:56:55)
    at resolveHook (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:71:20)
    at Function.resolveFilename (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:179:24)
    at Function.Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.&lt;anonymous&gt; (/playwright-tsconfig-extends-array/playwright.config.ts:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module.f._compile (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:994)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Object.i.&lt;computed&gt;.ot._extensions.&lt;computed&gt; (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:1010)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Function.Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at requireOrImport (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:163:20)
    at requireOrImportDefaultObject (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/configLoader.js:225:53)
    at ConfigLoader.loadConfigFile (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/configLoader.js:57:26)
    at runTests (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/cli.js:127:46)
    at ji.&lt;anonymous&gt; (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/cli.js:45:7) {
  code: 'ERR_INVALID_ARG_TYPE'
}"><pre class="notranslate"><code class="notranslate">&gt; playwright-tsconfig-extends-array@1.0.0 test
&gt; npx playwright test

TypeError: The "path" argument must be of type string. Received an instance of Array
    at new NodeError (node:internal/errors:399:5)
    at validateString (node:internal/validators:163:11)
    at Object.join (node:path:1172:7)
    at loadTsconfig (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/third_party/tsconfig-loader.js:107:35)
    at loadSyncDefault (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/third_party/tsconfig-loader.js:60:18)
    at tsConfigLoader (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/third_party/tsconfig-loader.js:42:22)
    at loadAndValidateTsconfigForFile (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:56:55)
    at resolveHook (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:71:20)
    at Function.resolveFilename (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:179:24)
    at Function.Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.&lt;anonymous&gt; (/playwright-tsconfig-extends-array/playwright.config.ts:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module.f._compile (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:994)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Object.i.&lt;computed&gt;.ot._extensions.&lt;computed&gt; (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:1010)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Function.Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at requireOrImport (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/transform.js:163:20)
    at requireOrImportDefaultObject (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/configLoader.js:225:53)
    at ConfigLoader.loadConfigFile (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/common/configLoader.js:57:26)
    at runTests (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/cli.js:127:46)
    at ji.&lt;anonymous&gt; (/playwright-tsconfig-extends-array/node_modules/@playwright/test/lib/cli.js:45:7) {
  code: 'ERR_INVALID_ARG_TYPE'
}
</code></pre></div>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.31.2]</li>
<li>Operating System: [Windows 10]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Link to the GitHub repository with the repro</strong><br>
NA</p>
<p dir="auto">or</p>
<p dir="auto"><strong>Playwright.config.ts file</strong> - Set the launchOptions</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    {
      name: 'Google Chrome',
      use: {
       channel: 'chromium',
        headless: false,
        launchOptions: {
          executablePath: &quot;C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe&quot;,
          args: ['--auth-server-whitelist=&quot;_&quot;'],
        },
      },
    },"><pre class="notranslate"><code class="notranslate">    {
      name: 'Google Chrome',
      use: {
       channel: 'chromium',
        headless: false,
        launchOptions: {
          executablePath: "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
          args: ['--auth-server-whitelist="_"'],
        },
      },
    },
</code></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong> - Launch the Application URL using below test</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test.describe(&quot;@Smoke Login&quot;, () =&gt; {
 test('Login TC', async ({page}) =&gt; {
    await page.goto(&quot;Application URL&quot;));
  });
});"><pre class="notranslate"><span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">describe</span><span class="pl-kos">(</span><span class="pl-s">"@Smoke Login"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
 <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'Login TC'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span>page<span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"Application URL"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Set the Config file using lauchoptions.</li>
<li>Run the command to execute test --&gt; npx playwright test login.spec.ts</li>
</ul>
<p dir="auto"><strong>Expected</strong><br>
Application should be launched in Incognito mode and login page should be displayed.</p>
<p dir="auto"><strong>Actual</strong><br>
Application login is automatically getting validated using SSO by playwright. While in incognito mode login screen should be displayed always. Playwright is automatically considering SSO. Which is stopping us to validate login using multiple credentials.</p>