# What happens when you scaffold a Playwright framework and run installed tests using bun?

DevFeed: [What happens when you scaffold a Playwright framework and run installed tests using bun?](<https://devfeed.tech/articles/what-happens-when-you-scaffold-a-playwright-framework-and-run-installed-tests-using-bun-22425.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/what-happens-when-you-create-playwright.html>)

Author: T.J. Maher (noreply@blogger.com)

Published: 2026-08-06T17:37:06Z

Content type: tutorial

Language: en

Sources: [T.J. Maher](<https://devfeed.tech/sources/t-j-maher.md>)

Topics: [Playwright](<https://devfeed.tech/topics/playwright.md>), [Bun](<https://devfeed.tech/topics/bun.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [bug](<https://devfeed.tech/tags/bug.md>), [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [dev](<https://devfeed.tech/tags/dev.md>), [framework](<https://devfeed.tech/tags/framework.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [install](<https://devfeed.tech/tags/install.md>), [javascript-runtime](<https://devfeed.tech/tags/javascript-runtime.md>), [node](<https://devfeed.tech/tags/node.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [npx](<https://devfeed.tech/tags/npx.md>), [package](<https://devfeed.tech/tags/package.md>), [package-json](<https://devfeed.tech/tags/package-json.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [powershell](<https://devfeed.tech/tags/powershell.md>), [run](<https://devfeed.tech/tags/run.md>), [tests](<https://devfeed.tech/tags/tests.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

The excerpt shows bun being used as the package manager alongside Node.js, which still runs Playwright's test runner. The author scaffolds a TypeScript project with `bun create playwright`, then notes a Windows issue requiring `bun add --dev @playwright/test` and `bunx playwright install` to install browsers. They run `bun install`, keep the generated `bun.lock.file`, remove `package-lock.json`, and add a test script to `package.json`. The included tests visit playwright.dev and check its title and "Get started" link; the excerpt outlines Playwright's arrange-act-assert pattern and locator actions and assertions. Tests are run with `bun run test`, with the generated report opened through Live Server. The excerpt cuts off during its description of installed dependencies.

## Source excerpt

We covered in the last blog post how to install bun, a new package manager. In this blog post, we will look into using bun to install a new Playwright framework. Create the Playwright Framework Once I installed bun on my Windows PC and was up and running I created a new folder, "bun-create-playwright". I opened up that folder in VS Code, along with a new PowerShell terminal. In that terminal I entered: bun create playwright This activated the interactive Playwright installer that Playwright comes with. I selected I wanted it to create for me a TypeScript project, placing the tests in the default folder, tests, but I decided not to add a GitHub Actions workflow. I wanted to experiment with using GitLab. I chose it to set up and install all the browsers for me... which it did... using NPX, part of Node. Wait a second, when it comes to our Playwright framework, doesn't bun replace node? No. Bun might be a JavaScript runtime, a package manager, and a bundler shipped as a single software tool, but in our case we are simply using it as a package manager in our Playwright framework. Bun works alongside Node.js in the Playwright project. We still use Playwright's test runner, a Node.js program. Bun handles installations and run tasks. Alert: Windows Bug! Initially, that wasn't enough to install Playwright's internal browsers. There is a bug with bun + Playwright Windows where we also need to: bun add --dev @playwright/test bunx playwright install That was enough for the browsers to install. Create the Bun Lock File After the browsers are installed, we need to install bun in our project, to create from the package.json a bun installation. Run in the Terminal: bun install Review the newly created file bun.lock.file in the root directory of the project. Delete the package-lock.json file. Add the test script to the Package.json If you look in the package.json file, you can see that the scripts code block is currently empty. "scripts": {} Inside this code block, we will be addin