Skip to content

Commit

Permalink
Merge b2729ad into b4fb57e
Browse files Browse the repository at this point in the history
  • Loading branch information
Hental committed Apr 16, 2018
2 parents b4fb57e + b2729ad commit 30f414f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 12 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
"type": "string",
"default": ""
},
"jest.cli.noColor": {
"description": "add jest cli option --no-color",
"type": "boolean",
"default": true
},
"jest.rootPath": {
"description": "The path to your frontend src folder",
"type": "string",
Expand Down Expand Up @@ -218,7 +223,7 @@
"elegant-spinner": "^1.0.1",
"istanbul-lib-coverage": "^1.1.1",
"istanbul-lib-source-maps": "^1.1.0",
"jest-editor-support": "22.4.0",
"jest-editor-support": "^23.0.0-alpha.6r",
"jest-snapshot": "^22.1.2",
"jest-test-typescript-parser": "^22.1.3",
"micromatch": "^2.3.11"
Expand Down
4 changes: 3 additions & 1 deletion src/JestProcessManagement/JestProcess.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { platform } from 'os'
import { Runner, ProjectWorkspace } from 'jest-editor-support'
import { getExtensionCliSettings } from '../extension'

export class JestProcess {
static readonly keepAliveLimit = 5
Expand All @@ -19,7 +20,8 @@ export class JestProcess {
// Use a shell to run Jest command on Windows in order to correctly spawn `.cmd` files
// For details see https://github.com/jest-community/vscode-jest/issues/98
const useShell = platform() === 'win32'
this.runner = new Runner(this.projectWorkspace, { shell: useShell })
const cliSettings = getExtensionCliSettings()
this.runner = new Runner(this.projectWorkspace, { shell: useShell, noColor: cliSettings.noColor })

this.restoreJestEvents()

Expand Down
8 changes: 8 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@ function getExtensionSettings(): IPluginSettings {
restartJestOnSnapshotUpdate: config.get<boolean>('restartJestOnSnapshotUpdate'),
}
}

export function getExtensionCliSettings(): { noColor?: boolean } {
const config = vscode.workspace.getConfiguration('jest.cli')

return {
noColor: config.get<boolean>('noColor'),
}
}
55 changes: 45 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2260,20 +2260,21 @@ jest-diff@^22.4.3:
jest-get-type "^22.4.3"
pretty-format "^22.4.3"

jest-diff@^23.0.0-alpha.6r:
version "23.0.0-alpha.6r"
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.0-alpha.6r.tgz#4dda1c7c9f8227496c417e4420cb889721ec11d7"
dependencies:
chalk "^2.0.1"
diff "^3.2.0"
jest-get-type "^22.1.0"
pretty-format "^23.0.0-alpha.6r"

jest-docblock@^22.4.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.3.tgz#50886f132b42b280c903c592373bb6e93bb68b19"
dependencies:
detect-newline "^2.1.0"

jest-editor-support@22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-editor-support/-/jest-editor-support-22.4.0.tgz#1f6e2359dbf90f84c1a8a16b911db5ef4333b0a0"
dependencies:
babel-traverse "^6.14.1"
babylon "^6.14.1"
jest-snapshot "^22.4.0"

jest-editor-support@^22.4.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-editor-support/-/jest-editor-support-22.4.3.tgz#3f9e6b60a6ecc2297ec39e0cad7b096e71aea159"
Expand All @@ -2282,6 +2283,14 @@ jest-editor-support@^22.4.3:
babylon "^6.14.1"
jest-snapshot "^22.4.3"

jest-editor-support@^23.0.0-alpha.6r:
version "23.0.0-alpha.6r"
resolved "https://registry.yarnpkg.com/jest-editor-support/-/jest-editor-support-23.0.0-alpha.6r.tgz#68e7a0a8c1157206e1b3beb17c1868d4a19854d7"
dependencies:
babel-traverse "^6.14.1"
babylon "^6.14.1"
jest-snapshot "^23.0.0-alpha.6r"

jest-environment-jsdom@^22.4.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz#d67daa4155e33516aecdd35afd82d4abf0fa8a1e"
Expand All @@ -2301,7 +2310,7 @@ jest-get-type@^21.2.0:
version "21.2.0"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23"

jest-get-type@^22.4.3:
jest-get-type@^22.1.0, jest-get-type@^22.4.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4"

Expand Down Expand Up @@ -2347,6 +2356,14 @@ jest-matcher-utils@^22.4.3:
jest-get-type "^22.4.3"
pretty-format "^22.4.3"

jest-matcher-utils@^23.0.0-alpha.6r:
version "23.0.0-alpha.6r"
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.0-alpha.6r.tgz#890a7dc151e324708d221a5d9f05a4b268439b95"
dependencies:
chalk "^2.0.1"
jest-get-type "^22.1.0"
pretty-format "^23.0.0-alpha.6r"

jest-message-util@^22.4.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.3.tgz#cf3d38aafe4befddbfc455e57d65d5239e399eb7"
Expand Down Expand Up @@ -2423,7 +2440,7 @@ jest-serializer@^22.4.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.3.tgz#a679b81a7f111e4766235f4f0c46d230ee0f7436"

jest-snapshot@^22.1.2, jest-snapshot@^22.4.0, jest-snapshot@^22.4.3:
jest-snapshot@^22.1.2, jest-snapshot@^22.4.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.3.tgz#b5c9b42846ffb9faccb76b841315ba67887362d2"
dependencies:
Expand All @@ -2434,6 +2451,17 @@ jest-snapshot@^22.1.2, jest-snapshot@^22.4.0, jest-snapshot@^22.4.3:
natural-compare "^1.4.0"
pretty-format "^22.4.3"

jest-snapshot@^23.0.0-alpha.6r:
version "23.0.0-alpha.6r"
resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.0-alpha.6r.tgz#e43a533b6afc07837ce3ccea93b59f49fc4e11fc"
dependencies:
chalk "^2.0.1"
jest-diff "^23.0.0-alpha.6r"
jest-matcher-utils "^23.0.0-alpha.6r"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
pretty-format "^23.0.0-alpha.6r"

jest-test-typescript-parser@^22.1.3:
version "22.4.3"
resolved "https://registry.yarnpkg.com/jest-test-typescript-parser/-/jest-test-typescript-parser-22.4.3.tgz#805d6e203c1aea5811e7019d998fe1917f130930"
Expand Down Expand Up @@ -3472,6 +3500,13 @@ pretty-format@^22.4.3:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"

pretty-format@^23.0.0-alpha.6r:
version "23.0.0-alpha.6r"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.0-alpha.6r.tgz#a50d8381a231f8ae231a8255d7e3de7a6c0d2fe5"
dependencies:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"

private@^0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
Expand Down

0 comments on commit 30f414f

Please sign in to comment.