We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 435ca4d commit 9aa9ecfCopy full SHA for 9aa9ecf
1 file changed
test/controllers/commit-view-controller.test.js
@@ -231,7 +231,12 @@ describe('CommitViewController', function() {
231
editor.setText('make some new changes');
232
233
// atom internals calls `confirm` on the ApplicationDelegate instead of the atom environment
234
- sinon.stub(atomEnvironment.applicationDelegate, 'confirm').returns(0); // Save
+ sinon.stub(atomEnvironment.applicationDelegate, 'confirm').callsFake((options, callback) => {
235
+ if (callback typeof 'function') {
236
+ callback(0); // Save
237
+ }
238
+ return 0; // TODO: Remove this return and typeof check once https://github.com/atom/atom/pull/16229 is on stable
239
+ });
240
commandRegistry.dispatch(atomEnvironment.views.getView(workspace), 'github:toggle-expanded-commit-message-editor');
241
await assert.async.equal(controller.getCommitMessageEditors().length, 0);
242
assert.isTrue(atomEnvironment.applicationDelegate.confirm.called);
0 commit comments