Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Jest Test Language SupportNew to Visual Studio Code? Get it now.
Jest Test Language Support

Jest Test Language Support

Danny Plain

|
2,861 installs
| (2) | Free
Jest Test Language Support provides syntax highlighting for your Jest test files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Jest Test Language Support

Jest Test Language Support provides syntax highlighting for your Jest global & lifecycle functions, and matchers.

Example Test Syntax Highlighting

Features

  • Syntax highlighting for Jest test files
  • Supports .spec & .test for JS, JSX, Typescript

How to Setup Custom Themes

  1. Open Preferences: Open Settings (JSON) from the Command Palette in VSCode

  2. Add custom styles to your theme of choice:

    {
        "editor.tokenColorCustomizations": {
            "[ThemeNameGoesHere]": {
                "textMateRules": [
                    {
                        "scope": "your.scope.selector",
                        "foreground": "#8d8feb",
                        "fontStyle": "bold"
                    },
                    ...
                ]
            }
        }
    } 
    

Example Theme Config

Example Theme Config

Scope Selectors

Below is a list of of scope selectors that can be used to set custom syntax color and font style.

Scope Description
scope.jest.test root scope
jest-global-function global jest functions
jest-lifecycle.[name] Jest lifecycles (beforeAll, afterEach, etc.)
expect-statement Highlights expect
describe-block Highlights describe
it-block Highlights it
jest-matcher.[name] Jest matchers (toEqual, toMatchSnapshot, etc.)
jest-matcher-prefix.not Jest matcher prefix for not

Check out this VS's Syntax Highlighting Guide
if you want to learn more about TextMate scope and selectors

Matchers

  • All matchers listed https://jestjs.io/docs/en/expect, that start with a . are covered in jest-matcher.[name]

Related Links

Jest Test Language Support - VSMarketplace
vscode-jest
Jest Snapshot Language Support

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft