jest-editor-support
Advanced tools
Comparing version 20.0.3 to 20.0.4
@@ -107,4 +107,4 @@ 'use strict'; /** | ||
name = element.name; | ||
// Because expect may have acccessors taked on (.to.be) or | ||
// nothing (expect()) we have to check mulitple levels for the name | ||
// Because expect may have accessors tacked on (.to.be) or nothing | ||
// (expect()) we have to check multiple levels for the name | ||
element = element.object || element.callee; | ||
@@ -111,0 +111,0 @@ } |
@@ -59,5 +59,7 @@ 'use strict';var _require = | ||
getConfig(completed) { | ||
this.debugprocess = this._createProcess(this.workspace, ['--showConfig']); | ||
this.getConfigProcess = this._createProcess(this.workspace, [ | ||
'--showConfig']); | ||
this.debugprocess.stdout.on('data', data => {var _JSON$parse = | ||
this.getConfigProcess.stdout.on('data', data => {var _JSON$parse = | ||
JSON.parse(data.toString());const config = _JSON$parse.config,version = _JSON$parse.version; | ||
@@ -70,5 +72,9 @@ // We can give warnings to versions under 17 now | ||
this.settings = config; | ||
}); | ||
// They could have an older build of Jest which | ||
// would error with `--showConfig` | ||
this.getConfigProcess.on('close', () => { | ||
completed(); | ||
}); | ||
}}; |
@@ -111,2 +111,10 @@ 'use strict'; | ||
sanitizeShortErrorMessage(string) { | ||
if (string.includes('does not match stored snapshot')) { | ||
return 'Snapshot has changed'; | ||
} | ||
if (string.includes('New snapshot was not written')) { | ||
return 'New snapshot is ready to write'; | ||
} | ||
return string. | ||
@@ -116,5 +124,5 @@ split('\n'). | ||
join(''). | ||
replace(' ', ' '). | ||
replace('Received:', ' Received:'). | ||
replace('Difference:', ' Difference:'); | ||
replace(/\s\s+/g, ' '). | ||
replace('Received:', ', Received:'). | ||
split('Difference:')[0]; | ||
} | ||
@@ -121,0 +129,0 @@ |
{ | ||
"name": "jest-editor-support", | ||
"version": "20.0.3", | ||
"version": "20.0.4", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
25460
621