Skip to content

Commit

Permalink
Add tests for exotic github resolver.
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed Oct 24, 2016
1 parent 20ce761 commit ba23a90
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions __tests__/resolvers/github-resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* @flow */

import GitHubResolver from '../../src/resolvers/exotics/github-resolver.js';

test('getGitSSHUrl with hash', () => {
const gitSSHUrl = GitHubResolver.getGitSSHUrl({
hash: 'some-hash',
repo: 'some-repo',
user: 'some-user',
});

expect(gitSSHUrl).toContain('some-hash');
});

test('getGitSSHUrl with no hash', () => {
const gitSSHUrl = GitHubResolver.getGitSSHUrl({
hash: '',
repo: 'some-repo',
user: 'some-user',
});

expect(gitSSHUrl).toContain('some-repo');
expect(gitSSHUrl).toContain('some-user');
});

0 comments on commit ba23a90

Please sign in to comment.