Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
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' },