Skip to content

Commit

Permalink
Add spec for new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
confused-Techie committed Sep 8, 2023
1 parent 9e5e217 commit 29b64b6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/upgrade-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 29b64b6

Please sign in to comment.