Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test(repository): updates test to use promise instead of callback
  • Loading branch information
hazmah0 committed Oct 19, 2019
commit 0234b39555e25065e4db1847d2ebd29731740590
13 changes: 6 additions & 7 deletions test/repository.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,13 @@ describe('Repository', function() {
});

it('should successfully write to repo when not providing optional options argument', function(done) {
remoteRepo.writeFile('master', fileName, initialText, initialMessage, undefined, assertSuccessful(done, function() {
wait()().then(() => remoteRepo.getContents('master', fileName, 'raw',
assertSuccessful(done, function(err, fileText) {
expect(fileText).to.be(initialText);
const promise = remoteRepo.writeFile('master', fileName, initialText, initialMessage);
promise.then(() => remoteRepo.getContents('master', fileName, 'raw',
assertSuccessful(done, function(err, fileText) {
expect(fileText).to.be(initialText);

done();
})));
}));
done();
})))
});

it('should rename files', function(done) {
Expand Down