How to use the jest-editor-support.ProjectWorkspace function in jest-editor-support

To help you get started, we’ve selected a few jest-editor-support examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jest-community / vscode-jest / src / extensionManager.ts View on Github external
register(workspaceFolder: vscode.WorkspaceFolder) {
    if (!this.shouldStart(workspaceFolder.name)) {
      return
    }
    const pluginSettings = getExtensionResourceSettings(workspaceFolder.uri)
    const jestPath = pathToJest(pluginSettings)
    const configPath = pathToConfig(pluginSettings)
    const currentJestVersion = 20
    const debugMode = pluginSettings.debugMode
    const instanceSettings = {
      multirootEnv: vscode.workspace.workspaceFolders.length > 1,
    }
    const jestWorkspace = new ProjectWorkspace(
      pluginSettings.rootPath,
      jestPath,
      configPath,
      currentJestVersion,
      workspaceFolder.name,
      null,
      debugMode
    )

    // Create our own console
    const channel = vscode.window.createOutputChannel(`Jest (${workspaceFolder.name})`)

    const failDiagnostics = vscode.languages.createDiagnosticCollection(`Jest (${workspaceFolder.name})`)

    this.extByWorkspace.set(
      workspaceFolder.name,
github jest-community / vscode-jest / src / extension.ts View on Github external
export function activate(context: vscode.ExtensionContext) {
  // To make us VS Code agnostic outside of this file
  const pluginSettings = getExtensionSettings()
  const jestPath = pathToJest(pluginSettings)
  const configPath = pathToConfig(pluginSettings)
  const currentJestVersion = 20
  const debugMode = pluginSettings.debugMode
  const workspace = new ProjectWorkspace(
    pluginSettings.rootPath,
    jestPath,
    configPath,
    currentJestVersion,
    null,
    debugMode
  )

  // Create our own console
  const channel = vscode.window.createOutputChannel('Jest')

  // We need a singleton to represent the extension
  extensionInstance = new JestExt(context, workspace, channel, pluginSettings)

  const languages = [
    { language: 'javascript' },

jest-editor-support

[![Build Status](https://github.com/jest-community/jest-editor-support/actions/workflows/node-ci.yml/badge.svg)](https://github.com/jest-community/jest-editor-support/actions) [![Coverage Status](https://coveralls.io/repos/github/jest-community/jest-edito

MIT
Latest version published 7 months ago

Package Health Score

58 / 100
Full package analysis

Similar packages