Skip to content

Commit 1808785

Browse files
committed
missed upstream change
1 parent ca9daf7 commit 1808785

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

script/test

+15-13
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ const coreRenderProcessTestSuites = []
194194
const testPath = path.join(CONFIG.repositoryRootPath, 'spec')
195195
let testFiles = glob.sync(path.join(testPath, '*-spec.+(js|coffee|ts|jsx|tsx|mjs)'))
196196
for (let testFile of testFiles) {
197+
const testArguments = [
198+
'--resource-path', resourcePath,
199+
'--test', testFile
200+
]
201+
// the function which runs by async:
197202
coreRenderProcessTestSuites.push( function (callback) {
198-
199203
const testEnv = prepareEnv('core-render-process')
200204
console.log(`##[command] Executing core render process tests for ${testFile}`.bold.green)
201-
const testArguments = [
202-
'--resource-path', resourcePath,
203-
'--test', testFile
204-
]
205205
spawnTest(executablePath, testArguments, {env: testEnv}, callback, `core-render-process in ${testFile}.`)
206206
})
207207
}
@@ -230,15 +230,17 @@ for (let packageName in CONFIG.appMetadata.packageDependencies) {
230230

231231
const testFolder = path.join(repositoryPackagePath, testSubdir)
232232

233+
const testArguments = [
234+
'--resource-path', resourcePath,
235+
'--test', testFolder
236+
]
237+
238+
const pkgJsonPath = path.join(repositoryPackagePath, 'package.json')
239+
const nodeModulesPath = path.join(repositoryPackagePath, 'node_modules')
240+
241+
// the function which runs by async:
233242
packageTestSuites.push(function (callback) {
234-
const testArguments = [
235-
'--resource-path', resourcePath,
236-
'--test', testFolder
237-
]
238243
const testEnv = prepareEnv(`bundled-package-${packageName}`)
239-
240-
const pkgJsonPath = path.join(repositoryPackagePath, 'package.json')
241-
const nodeModulesPath = path.join(repositoryPackagePath, 'node_modules')
242244
let finalize = () => null
243245
if (require(pkgJsonPath).atomTestRunner) {
244246
console.log(`##[command] Installing test runner dependencies for ${packageName}`.bold.green)
@@ -359,7 +361,7 @@ async.series(testSuitesToRun, function (err, results) {
359361
const failedSteps = results.filter(({exitCode}) => exitCode !== 0)
360362

361363
if (failedSteps.length > 0) {
362-
console.warn("\n \n ##[error] *** Reporting the errors that happened in all of the tests: *** \n \n")
364+
console.warn("\n \n ##[error] *** Reporting the errors that happened in all of the tests: *** \n \n")
363365
for (const {step, testCommand} of failedSteps) {
364366
console.error(`##[error] The '${step}' test step finished with a non-zero exit code \n ${testCommand}`)
365367
}

0 commit comments

Comments
 (0)