Skip to content

Commit

Permalink
ref microsoft#44776 Removed the test for deleteRef method
Browse files Browse the repository at this point in the history
* as we don't use stub in test
  • Loading branch information
ryu1kn committed Apr 11, 2018
1 parent 6b7a644 commit a028238
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions extensions/git/src/test/git.test.ts
Expand Up @@ -6,9 +6,8 @@
'use strict';

import 'mocha';
import { Git, GitStatusParser, Repository, parseGitCommit, parseGitmodules } from '../git';
import { GitStatusParser, parseGitCommit, parseGitmodules } from '../git';
import * as assert from 'assert';
import * as sinon from 'sinon';

suite('git', () => {
suite('GitStatusParser', () => {
Expand Down Expand Up @@ -214,18 +213,4 @@ This is a commit message.`;
});
});
});

suite('Repository', () => {
suite('deleteRef', () => {
const spawnOption = {};
const git = sinon.createStubInstance(Git);
git.exec = sinon.spy();
const repository = new Repository(git, 'REPOSITORY_ROOT');

test('delete ref', async () => {
await repository.deleteRef('REF_TO_BE_DELETED');
assert.deepEqual(git.exec.args, [['REPOSITORY_ROOT', ['update-ref', '-d', 'REF_TO_BE_DELETED'], spawnOption]]);
});
});
});
});

0 comments on commit a028238

Please sign in to comment.