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

Commit 0832dfb

Browse files
committed
GitTabView test coverage
1 parent 59a9daa commit 0832dfb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/fixtures/props/git-tab-props.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ export async function gitTabViewProps(atomEnv, repository, overrides = {}) {
102102
discardWorkDirChangesForPaths: () => {},
103103
openFiles: () => {},
104104

105+
contextLocked: false,
105106
changeWorkingDirectory: () => {},
107+
setContextLock: () => {},
106108
onDidChangeWorkDirs: () => ({dispose: () => {}}),
107-
getCurrentWorkDirs: () => [],
109+
getCurrentWorkDirs: () => new Set(),
108110
onDidUpdateRepo: () => ({dispose: () => {}}),
109111
getCommitter: () => nullAuthor,
110112

test/views/git-tab-view.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ describe('GitTabView', function() {
286286
it('calls changeWorkingDirectory when a project is selected', async function() {
287287
const changeWorkingDirectory = sinon.spy();
288288
const wrapper = shallow(await buildApp({changeWorkingDirectory}));
289-
wrapper.find('GitTabHeaderController').prop('handleWorkDirSelect')({target: {value: 'some-path'}});
289+
wrapper.find('GitTabHeaderController').prop('changeWorkingDirectory')('some-path');
290290
assert.isTrue(changeWorkingDirectory.calledWith('some-path'));
291291
});
292292
});

0 commit comments

Comments
 (0)