mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-24 16:52:22 +00:00
add base test setup
This commit is contained in:
parent
79589458c2
commit
9d56ac50e1
@ -1,7 +1,7 @@
|
||||
abstract-record-store
|
||||
=====================
|
||||
|
||||
[](http://ipn.io) [[](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
[](http://ipn.io) [](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
|
||||
> A test suite and interface you can use to implement a a IPRS compliant(https://github.com/ipfs/specs/tree/master/records) Record Store.
|
||||
|
||||
|
24
package.json
Normal file
24
package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "abstract-record-store",
|
||||
"version": "0.0.0",
|
||||
"description": "A test suite and interface you can use to implement a a IPRS compliant(https://github.com/ipfs/specs/tree/master/records) Record Store",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/diasdavid/abstract-record-store.git"
|
||||
},
|
||||
"keywords": [
|
||||
"IPFS"
|
||||
],
|
||||
"author": "David Dias <daviddias@ipfs.io>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/diasdavid/abstract-record-store/issues"
|
||||
},
|
||||
"homepage": "https://github.com/diasdavid/abstract-record-store",
|
||||
"dependencies": {
|
||||
"timed-tape": "^0.1.0"
|
||||
}
|
||||
}
|
15
tests/base-test.js
Normal file
15
tests/base-test.js
Normal file
@ -0,0 +1,15 @@
|
||||
module.exports.all = function (test, common) {
|
||||
|
||||
test('Store a valid record', function (t) {
|
||||
common.setup(test, function (err, recordStore) {
|
||||
t.ifError(err, 'Should not throw')
|
||||
t.pass('woo')
|
||||
})
|
||||
})
|
||||
|
||||
test('Store an unvalid record')
|
||||
test('Store and retrieve a valid record')
|
||||
test('Store a bunch of valid and unvalid records and check what gets retrieved')
|
||||
test('Store a bunch of records with variable validity, wait for some to expire, check what gets retrieved')
|
||||
|
||||
}
|
6
tests/index.js
Normal file
6
tests/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
var timed = require('timed-tape')
|
||||
|
||||
module.exports = function (test, common) {
|
||||
test = timed(test)
|
||||
require('./base-test.js').all(test, common)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user