Skip to content

Commit 6d54c6b

Browse files
committed
Use search API fixtures with nock directly
1 parent 44702b3 commit 6d54c6b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
"mocha": "^2.3.4",
7676
"must": "^0.13.1",
7777
"nock": "^8.0.0",
78-
"nock-playback": "^1.1.0",
7978
"vinyl-buffer": "^1.0.0",
8079
"vinyl-source-stream": "^1.1.0"
8180
},

test/search.spec.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import expect from 'must';
2-
import playback from 'nock-playback';
2+
import nock from 'nock';
33

44
import Github from '../lib/GitHub';
55
import testUser from './fixtures/user.json';
@@ -14,10 +14,9 @@ describe('Search', function() {
1414
password: testUser.PASSWORD,
1515
auth: 'basic'
1616
});
17+
nock.load('test/fixtures/search.json');
1718
});
1819

19-
playback('search');
20-
2120
it('should search repositories', function() {
2221
let options;
2322
let search = github.search({
@@ -73,4 +72,9 @@ describe('Search', function() {
7372
expect(data.length).to.be.above(0);
7473
});
7574
});
75+
76+
after(function() {
77+
nock.cleanAll();
78+
nock.restore();
79+
});
7680
});

0 commit comments

Comments
 (0)