diff --git a/aio/tools/ng-packages-installer/index.js b/aio/tools/ng-packages-installer/index.js index d6c5aca5cb..702dec212c 100644 --- a/aio/tools/ng-packages-installer/index.js +++ b/aio/tools/ng-packages-installer/index.js @@ -128,7 +128,7 @@ class NgPackagesInstaller { * Yarn will also delete the local marker file for us. */ restoreNpmDependencies() { - this._installDeps('--check-files'); + this._installDeps('--freeze-lockfile', '--check-files'); } // Protected helpers diff --git a/aio/tools/ng-packages-installer/index.spec.js b/aio/tools/ng-packages-installer/index.spec.js index 55ba1c5384..8d8c430172 100644 --- a/aio/tools/ng-packages-installer/index.spec.js +++ b/aio/tools/ng-packages-installer/index.spec.js @@ -194,10 +194,10 @@ describe('NgPackagesInstaller', () => { }); describe('restoreNpmDependencies()', () => { - it('should run `yarn install --check-files` in the specified directory', () => { + it('should run `yarn install` in the specified directory, with the correct options', () => { spyOn(installer, '_installDeps'); installer.restoreNpmDependencies(); - expect(installer._installDeps).toHaveBeenCalledWith('--check-files'); + expect(installer._installDeps).toHaveBeenCalledWith('--freeze-lockfile', '--check-files'); }); });