DefinitelyTyped/types/current-git-branch/current-git-branch-tests.ts
Max Boguslavsky 0b97a539e8 Added @type/current-git-branch to repo (#38950)
* added @type/current-git-branch

* fixed version

* exported types and interface; updated tests

* added two spaces
2019-10-07 17:12:40 -07:00

13 lines
348 B
TypeScript

import getBranchName, { CurrentGitBranchOptions } from 'current-git-branch';
// test data
const emptyOptions: CurrentGitBranchOptions = {};
const filledOptions: CurrentGitBranchOptions = {altPath: '', branchOptions: ''};
// tests
getBranchName();
getBranchName(emptyOptions);
getBranchName(filledOptions);
getBranchName('');
getBranchName(['']);