lhorie / test-private-monorepo

1 stars 0 forks source link

Known issues (when importing fusion.js packages) #3

Open lhorie opened 5 years ago

lhorie commented 5 years ago

rush

workspaces

lhorie commented 5 years ago

Issue: src/__tests__/integration.node.js hangs in fusion-apollo-universal-client when running yarn test individually Cause: recent versions of yarn have a bug that prevents child processes from exiting Resolution: Run ../../common/temp/yarn-local/node_modules/.bin/yarn test instead

lhorie commented 5 years ago

Some browser tests fail on token-related issues due to a jest bug: https://github.com/facebook/jest/issues/7840 (see also, https://github.com/defunctzombie/node-browser-resolve/pull/92)

lhorie commented 5 years ago

fusion-cli test-jest-app tests started timing out after importing a few more repos. Increasing timeout seems to fix the issue

lhorie commented 5 years ago

Several fusion-cli test failures were happening due to files that had not been copied correctly (due to using --exclude rules in rsync). The offending rules were --exclude node_modules and --exclude dist

Some other packages were getting test errors due to missing yarn.lock or package-lock.json files. To fix them, ensure rsync is used without --exclude yarn.lock and --exclude package-lock.json. Instead, rm -f yarn.lock from each package instead to ensure only the top-level lock file is removed in each project.

lhorie commented 5 years ago

Some test failures can appear if packages are not linked. This can happen if they are not included in the projects field in the rush.json file, or if their versions are not aligned. node scripts/verify-linking can detect whether project linking is setup correctly. node scripts/sync-versions ensures package versions are correct in the dependencies/devDependencies/peerDependencies fields of all packages.