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

Commit bd6b8fb

Browse files
committed
ok now maybe fixed tests
1 parent 1d9de01 commit bd6b8fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/views/directory-select.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('DirectorySelect', function() {
4747

4848
describe('clicking the directory button', function() {
4949
it('populates the destination path buffer on accept', async function() {
50-
const showOpenDialog = sinon.stub().callsArgWith(2, {filePaths: ['/some/directory/path']});
50+
const showOpenDialog = sinon.stub().returns(Promise.resolve({filePaths: ['/some/directory/path']}));
5151
const buffer = new TextBuffer({text: '/original'});
5252

5353
const wrapper = shallow(buildApp({showOpenDialog, buffer}));
@@ -58,7 +58,7 @@ describe('DirectorySelect', function() {
5858
});
5959

6060
it('leaves the destination path buffer unmodified on cancel', async function() {
61-
const showOpenDialog = sinon.stub().callsArgWith(2, {filePaths: undefined});
61+
const showOpenDialog = sinon.stub().returns(Promise.resolve({filePaths: undefined}));
6262
const buffer = new TextBuffer({text: '/original'});
6363

6464
const wrapper = shallow(buildApp({showOpenDialog, buffer}));

0 commit comments

Comments
 (0)