This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(http): refactor ipfs-api tests and make them all pass again
- Loading branch information
Showing
15 changed files
with
460 additions
and
1,752 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,8 @@ | ||
/* eslint-env mocha */ | ||
'use strict' | ||
|
||
const expect = require('chai').expect | ||
// const expect = require('chai').expect | ||
|
||
module.exports = (httpAPI) => { | ||
describe('bitswap', function () { | ||
this.timeout(20000) | ||
describe('commands', () => { | ||
let api | ||
before(() => { | ||
api = httpAPI.server.select('API') | ||
}) | ||
|
||
it('wantlist', (done) => { | ||
api.inject({ | ||
method: 'GET', | ||
url: '/api/v0/bitswap/wantlist' | ||
}, (res) => { | ||
expect(res.statusCode).to.equal(200) | ||
expect(res.result).to.have.property('Keys') | ||
|
||
// TODO test that there actual values in there | ||
done() | ||
}) | ||
}) | ||
|
||
it('stat', (done) => { | ||
api.inject({ | ||
method: 'GET', | ||
url: '/api/v0/bitswap/stat' | ||
}, (res) => { | ||
expect(res.statusCode).to.equal(200) | ||
|
||
expect(res.result).to.have.keys([ | ||
'BlocksReceived', | ||
'Wantlist', | ||
'Peers', | ||
'DupBlksReceived', | ||
'DupDataReceived' | ||
]) | ||
// TODO test that there actual values in there | ||
done() | ||
}) | ||
}) | ||
|
||
it.skip('unwant', () => { | ||
}) | ||
}) | ||
}) | ||
module.exports = (http) => { | ||
describe('bitswap', () => {}) // TODO | ||
} |
Oops, something went wrong.