Skip to content

Commit 0d2a726

Browse files
committed
Switch to Tape
1 parent 804c036 commit 0d2a726

File tree

6 files changed

+28
-60
lines changed

6 files changed

+28
-60
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ node_js:
44
- "0.10"
55
script:
66
- npm test
7-
- npm run lint

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
[![Build Status](https://travis-ci.org/darvin/github.png?branch=master)](https://travis-ci.org/darvin/github)
55

6+
[![Coverage Status](https://img.shields.io/coveralls/michael/github.svg)](https://coveralls.io/r/michael/github)
7+
68
# Github.js
79

810
Github.js provides a minimal higher-level wrapper around git's [plumbing commands](http://git-scm.com/book/en/Git-Internals-Plumbing-and-Porcelain), exposing an API for manipulating GitHub repositories on the file level. It is being developed in the context of [Prose](http://prose.io), a content editor for GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
"description": "A higher-level wrapper around the Github API.",
55
"main": "github.js",
66
"dependencies": {
7-
"xmlhttprequest": "~1.6.0",
8-
"underscore": "~1.6.0"
7+
"tape": "^3.0.3",
8+
"underscore": "~1.6.0",
9+
"xmlhttprequest": "~1.6.0"
910
},
1011
"devDependencies": {
1112
"chai": "*",
12-
"jshint": "^2.5.8",
13-
"mocha": "*"
13+
"jshint": "^2.5.8"
1414
},
1515
"scripts": {
16-
"test": "mocha",
17-
"lint": "jshint github.js"
16+
"test": "tape test/test.* && jshint github.js test/*"
1817
},
1918
"repository": {
2019
"type": "git",

test/auth_test.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

test/test.auth.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
var test = require('tape');
2+
var Github = require("../");
3+
4+
var TEST_USERNAME = "mikedeboertest";
5+
var TEST_PASSWORD = "test1324";
6+
7+
test("Basic Auth", function(t) {
8+
var timeout = setTimeout(function () { t.fail(); }, 10000);
9+
var github = new Github({
10+
username: TEST_USERNAME,
11+
password: TEST_PASSWORD,
12+
auth: "basic"
13+
});
14+
var user = github.getUser();
15+
16+
t.equals(Object.keys(user).length, 10);
17+
t.equals(Object.keys(user).indexOf('repos') > -1, true);
18+
clearTimeout(timeout);
19+
t.end();
20+
21+
});

test/test_runner.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)