Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8199d65

Browse files
committed
Unit test to ensure ResolutionConflictController can be disabled
1 parent d480fc4 commit 8199d65

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/controllers/repository-conflict-controller.test.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,26 @@ describe('RepositoryConflictController', () => {
6767
await assert.async.equal(wrapper.find(EditorConflictController).length, 2);
6868
});
6969
});
70+
71+
describe('with the configuration option disabled', function() {
72+
beforeEach(function() {
73+
atomEnv.config.set('github.graphicalConflictResolution', false);
74+
});
75+
76+
it('renders no children', async function() {
77+
const workdirPath = await cloneRepository('merge-conflict');
78+
const repository = await buildRepository(workdirPath);
79+
80+
await assert.isRejected(repository.git.merge('origin/branch'));
81+
82+
await Promise.all(['modified-on-both-ours.txt', 'modified-on-both-theirs.txt'].map(basename => {
83+
return workspace.open(path.join(workdirPath, basename));
84+
}));
85+
86+
app = React.cloneElement(app, {repository});
87+
const wrapper = mount(app);
88+
89+
await assert.async.lengthOf(wrapper.find(EditorConflictController), 0);
90+
});
91+
});
7092
});

0 commit comments

Comments
 (0)