Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Test coverage for RootController change
Browse files Browse the repository at this point in the history
  • Loading branch information
smashwilson committed Nov 13, 2018
1 parent 35a7aaa commit 058dd0f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/controllers/root-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,17 @@ describe('RootController', function() {
assert.strictEqual(item.getTitle(), 'Commit preview');
assert.lengthOf(wrapper.update().find('CommitPreviewItem'), 1);
});

it('registers a command to toggle the commit preview item', async function() {
const workdir = await cloneRepository('three-files');
const repository = await buildRepository(workdir);
const wrapper = mount(React.cloneElement(app, {repository}));
assert.isFalse(wrapper.find('CommitPreviewItem').exists());

atomEnv.commands.dispatch(workspace.getElement(), 'github:toggle-commit-preview');

assert.lengthOf(wrapper.update().find('CommitPreviewItem'), 1);
});
});

describe('context commands trigger event reporting', function() {
Expand Down

0 comments on commit 058dd0f

Please sign in to comment.