Skip to content

Make it easier to run a single Jest test file in vscode#1344

Merged
zetter-rpf merged 3 commits intomainfrom
jest-task
Feb 27, 2026
Merged

Make it easier to run a single Jest test file in vscode#1344
zetter-rpf merged 3 commits intomainfrom
jest-task

Conversation

@zetter-rpf
Copy link
Contributor

@zetter-rpf zetter-rpf commented Feb 26, 2026

Vscode already hooks in to npm tasks, but I don't think there's a way to make it work with an npm task that runs on the current file.

I've added tasks for running the current jest file and the current cypress file (both headed and headless)

Individuals can assign this as shortcut key if they want.

Vscode already hooks in to npm tasks, but I don't think there's a way to make it work with an npm task that runs on the current file.

Individuals can assign this as shortcut key if they want.
@zetter-rpf zetter-rpf marked this pull request as ready for review February 26, 2026 12:34
Copilot AI review requested due to automatic review settings February 26, 2026 12:34
@zetter-rpf zetter-rpf temporarily deployed to previews/1344/merge February 26, 2026 12:34 — with GitHub Actions Inactive
@zetter-rpf zetter-rpf changed the title Make it easier to run a single test file jest in vscode Make it easier to run a single Jest test fike in vscode Feb 26, 2026
@zetter-rpf zetter-rpf changed the title Make it easier to run a single Jest test fike in vscode Make it easier to run a single Jest test file in vscode Feb 26, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a VS Code task to simplify running Jest tests for the currently open file via yarn test, aligning with the repo’s existing Jest setup (scripts/test.js and package.json test script).

Changes:

  • Add .vscode/tasks.json with a “Test Current File (Jest)” task that runs yarn test --runTestsByPath --watchAll=false ${file}.
  • Configure task presentation to always reveal output in a dedicated panel.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zetter-rpf zetter-rpf temporarily deployed to previews/1344/merge February 26, 2026 15:00 — with GitHub Actions Inactive
Copy link
Contributor

@adrian-rpf adrian-rpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think this look useful

@zetter-rpf zetter-rpf merged commit a7f55df into main Feb 27, 2026
7 checks passed
@zetter-rpf zetter-rpf deleted the jest-task branch February 27, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants