1 hour ago · 8 min read1596 words · Tech · hide · 0 comments

Now that we have installed bun, Anthropic's package manager, and scaffolded a Playwright framework and closely examined the results, we are going to explore with our Bun-Create-Playwright project ways to check if our code is correct. The first method we will be exploring is typechecking. Why Typechecking? As the Playwright.dev / Node.js Introduction mentions:"[...] Playwright does not check the types and will run tests even if there are non-critical TypeScript compilation errors. We recommend you run TypeScript compiler alongside Playwright."[...] Note that Playwright only supports the following tsconfig options: allowJs, baseUrl, paths, references and extends."[...] By default, Playwright will look up a closest tsconfig for each imported file by going up the directory structure and looking for tsconfig.json or jsconfig.json. This way, you can create a tests/tsconfig.json file that will be used only for your tests and Playwright will pick it up automatically".Before we go further down…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.