forked from github-tools/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
27 lines (22 loc) · 736 Bytes
/
test.js
File metadata and controls
27 lines (22 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var test = require('tape');
var Github = require('../');
if (process.browser) require('console-log').show(true);
test("Issues from non-existant repo", function issuesTest(t) {
var github = new Github({});
var issues = github.getIssues("jlord", "googleslied");
issues.list({}, function(err, issues) {
t.true(err, "No error");
t.equal(err.request.status, 404, "Status is 404");
t.end();
});
});
test("Issues from actual repo", function issuesTest(t) {
var github = new Github({});
var issues = github.getIssues("joyent", "node");
issues.list({}, function(err, issues) {
t.true(!err, "Has no errors")
// console.log(issues)
t.true(Array.isArray(issues), "Returned array")
t.end()
});
});