From 29b64b66ebc7b97da68e66238c589cc63e221ae3 Mon Sep 17 00:00:00 2001 From: confused-Techie Date: Thu, 7 Sep 2023 20:59:44 -0700 Subject: [PATCH] Add spec for new behavior --- spec/upgrade-spec.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/upgrade-spec.js b/spec/upgrade-spec.js index 7b0b5b77..76278749 100644 --- a/spec/upgrade-spec.js +++ b/spec/upgrade-spec.js @@ -76,6 +76,23 @@ describe('apm upgrade', () => { }); }); + it('does not display updates for "core" packages', () => { + fs.writeFileSync(path.join(packagesDir, 'core-package', 'package.json'), JSON.stringify({ + name: 'core-package', + version: '1.0', + repository: 'https://github.com/pulsar-edit/pulsar' + })); + const callback = jasmine.createSpy('callback'); + apm.run(['upgrade', '--list', '--no-color'], callback); + + waitsFor('waiting for upgrade to complete', 600000, () => callback.callCount > 0); + + runs(() => { + expect(console.log).toHaveBeenCalled(); + expect(console.log.argsForCall[1][0]).toContain('empty'); + }); + }); + it('does not display updates for packages whose engine does not satisfy the installed Atom version', () => { fs.writeFileSync(path.join(packagesDir, 'test-module', 'package.json'), JSON.stringify({ name: 'test-module',