-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Fix test_javascript Snapshot Test failure #19308
Comments
Your failing test is due to jestjs/jest#6162 |
@SimenB thanks, seems safe to update these snapshots then. Landing in #19414 Still have one more failure to address:
|
Found your PR, jestjs/jest#6173 - I'll change these to |
Now looking at:
|
That last one I don't know, we haven't changed timers |
Agree, seems unrelated. I'm just using this issue to track my progress getting back to green. The snapshot update has not landed yet as it looks like we're still using 23.0.0-charlie.1 in the internal monorepo, and therefore the new snapshots cause the internal jest snapshot tests to fail. I've started the process of updating the repo to charlie.2, but that seems like something that @brunotavares might already be planning to do. I'll see if we can just make sure the use of jest in OSS Circle CI matches the internal Sandcastle test behavior. |
|
Bumping the version to charlie.4 is quite straightforward, but I'd need to codemod the rest of the codebase to handle the breaking change in jestjs/jest#6173 as well. Seeing @brunotavares has already done some of this work in another one of our internal repos, I'll let him or his team tackle this. RN OSS is using [email protected] but from I recall, some charlie.2 and charlie.4 modules are getting pulled by Yarn. We use an offline repository internally where charlie.1 is the latest cached version, so we don't have this issue. |
Jest 23 is now publicly available. I'll wait for our codebase to move to 23, at which point these should be resolved. |
SHA-1 issue may be fixed by jestjs/jest#6264 Jest 23 has not yet been configured in the internal monorepo, issue should remain open. |
We'll be updating our monorepo to 23.0.1 very soon - some breaking changes between the |
Now that we're using 23.0.1, new failures have surfaced in
Summary of all failing tests
FAIL local-cli/core/__tests__/android/getProjectConfig.spec.js
● android::getProjectConfig › returns `null` if manifest file hasn't been found
● android::getProjectConfig › returns
● android::getProjectConfig › returns an object with android project configuration for › nested structure
● android::getProjectConfig › returns an object with android project configuration for › nested structure
● android::getProjectConfig › returns an object with android project configuration for › flat structure
● android::getProjectConfig › returns an object with android project configuration for › flat structure
● android::getProjectConfig › returns an object with android project configuration for › multiple
● android::getProjectConfig › returns an object with android project configuration for › multiple
● android::getProjectConfig › should return
● android::getProjectConfig › should return
FAIL local-cli/util/tests/findSymlinkedModules-test.js
● findSymlinksForProjectRoot › correctly finds scoped module symlinks
● findSymlinksForProjectRoot › correctly finds module symlinks within other module symlinks
● findSymlinksForProjectRoot › correctly handles duplicate symlink paths
● findSymlinksForProjectRoot › correctly handles symlink recursion
FAIL local-cli/core/tests/ios/findProject.spec.js
● ios::findProject › returns null if there are no projects
● ios::findProject › returns ios project regardless of its name
● ios::findProject › ignores node_modules
● ios::findProject › ignores Pods
● ios::findProject › ignores Pods inside
● ios::findProject › ignores xcodeproj from example folders
● ios::findProject › ignores xcodeproj from sample folders
● ios::findProject › ignores xcodeproj from test folders at any level
FAIL local-cli/core/tests/android/findManifest.spec.js
● android::findManifest › returns a manifest path if file exists in the folder
● android::findManifest › returns
● android::findManifest › returns
FAIL local-cli/core/tests/android/getDependencyConfig.spec.js
● android::getDependencyConfig › returns an object with android project configuration
● android::getDependencyConfig › returns
● android::getDependencyConfig › returns
● android::getDependencyConfig › returns
● android::getDependencyConfig › returns
● android::getDependencyConfig › returns
● android::getDependencyConfig › returns
● android::getDependencyConfig › returns
● android::getDependencyConfig › returns
FAIL local-cli/core/tests/android/findAndroidAppFolder.spec.js
● android::findAndroidAppFolder › returns an android app folder if it exists in the given folder
● android::findAndroidAppFolder › returns
● android::findAndroidAppFolder › returns
FAIL local-cli/core/tests/ios/getProjectConfig.spec.js
● ios::getProjectConfig › returns an object with ios project configuration
● ios::getProjectConfig › returns
● ios::getProjectConfig › returns
● ios::getProjectConfig › returns normalized shared library names
● ios::getProjectConfig › returns normalized shared library names
FAIL local-cli/core/tests/ios/findPodspecName.spec.js
● ios::findPodspecName › returns podspec name if only one exists
● ios::findPodspecName › returns podspec name that match packet directory
● ios::findPodspecName › returns first podspec name if not match in directory
FAIL local-cli/core/tests/android/readManifest.spec.js
● android::readManifest › returns manifest content if file exists in the folder
● android::readManifest › throws an error if there is no manifest in the folder
● android::readManifest › throws an error if there is no manifest in the folder
FAIL local-cli/core/tests/android/findPackageClassName.spec.js
● android::findPackageClassName › returns manifest content if file exists in the folder
● android::findPackageClassName › returns the name of the java class implementing ReactPackage
● android::findPackageClassName › returns the name of the java class implementing ReactPackage
● android::findPackageClassName › returns the name of the kotlin class implementing ReactPackage
● android::findPackageClassName › returns the name of the kotlin class implementing ReactPackage
● android::findPackageClassName › returns
● android::findPackageClassName › returns
FAIL local-cli/core/tests/findAssets.spec.js
● findAssets › returns an array of all files in given folders
● findAssets › prepends assets paths with the folder path
● findAssets › prepends assets paths with the folder path
● findAssets › returns an empty array if given assets are null
FAIL local-cli/core/tests/ios/findPodfilePath.spec.js
● ios::findPodfilePath › returns Podfile path if it exists
Test Suites: 12 failed, 2 skipped, 88 passed, 100 of 102 total |
This appears to be caused by 2374147#diff-92a820d31d16eb53d84d5a4444407d39, as reverting that commit fixes the tests. Looking into how these tests can be fixed right now. |
Fix incoming #19510 |
#19510 closed as this is not the correct fix. We're still blocked on these failing tests, and it's not clear why they're failing. |
The
test_javascript
job started failing onmaster
recently: https://circleci.com/gh/facebook/react-native/42926This is due to failing snapshot tests, mostly in
VirtualizedList
(expand details below to see an example).This does not repro on a clean local checkout on my laptop, but after some investigation, I narrowed this down to Jest v
23.0.0-charlie.2
being used in CI. While our ownpackage.json
specifies jest v23.0.0-charlie.1
, themetro
package v0.37
depends on jest v23.0.0-charlie.2
and thus this version wins out.The test started failing once metro was bumped to v
0.37
in 803afd8.You can reproduce the failure locally by following the repro steps below.
Environment
CircleCI
Steps to Reproduce
yarn add --dev [email protected]
yarn test
Expected Behavior
Tests should pass.
Actual Behavior
Snapshot tests fail due to non-matching snapshots.
The text was updated successfully, but these errors were encountered: