Perhaps `yarn install` into a tmp dir, then do a file contents comparison
Perhaps
yarn installinto a tmp dir, then do a file contents comparison