Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd78dd73

Browse files
committed
Fix test runner breaking
The test runner script tried to pass the Jest config asstringified JSON, but that was breaking for me somehow.Sidestepped the problem by writing the settings to disk insteadand pointing Jest to that file.
1 parent37e2ce7 commitd78dd73

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ test/**/lcov.info
1010
test/**/lcov-report
1111
test/react/*/test/**/*.spec.js
1212
test/react/**/src
13+
test/jest-config.json
1314
lcov.info
1415

1516
lib/core/metadata.js

‎test/run-tests.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
constnpmRun=require('npm-run')
2+
constfs=require('fs')
3+
constpath=require('path')
24
constLATEST_VERSION='16.6'
35
constversion=process.env.REACT||LATEST_VERSION
46

@@ -27,7 +29,13 @@ if (version.toLowerCase() === 'all') {
2729
}
2830
}
2931

32+
constconfigFilePath=path.join(__dirname,'jest-config.json')
33+
34+
fs.writeFileSync(configFilePath,JSON.stringify(jestConfig))
35+
36+
constcommandLine=`jest -c "${configFilePath}"${process.argv.slice(2).join(' ')}`
37+
3038
npmRun.execSync(
31-
`jest -c '${JSON.stringify(jestConfig)}'${process.argv.slice(2).join(' ')}`,
39+
commandLine,
3240
{stdio:'inherit'}
3341
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp