mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-05-01 09:22:21 +00:00
time out increased
This commit is contained in:
parent
61c0c663d6
commit
58fe038e07
@ -4,7 +4,6 @@ module.exports = function (config) {
|
||||
var deps = [
|
||||
'deps/forge.bundle.js'
|
||||
]
|
||||
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['mocha'],
|
||||
@ -33,7 +32,7 @@ module.exports = function (config) {
|
||||
{ test: /\.json$/, loader: 'json' }
|
||||
],
|
||||
noParse: []
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
webpackMiddleware: {
|
||||
|
@ -13,7 +13,7 @@ var isNode = !global.window
|
||||
// protobuf read from file
|
||||
var messages = isNode ? protobuf(fs.readFileSync(__dirname + '/../pb/crypto.proto')) : protobuf(require('buffer!./../pb/crypto.proto'))
|
||||
|
||||
//for some reason webpack can only find forge at forge.forge().someFunction()...
|
||||
// for some reason webpack can only find forge at forge.forge().someFunction()
|
||||
// browser should be able to just use forge.someFunction()
|
||||
// this is only happening when js-ipfs bundles peer-id module
|
||||
/* if(!isNode){
|
||||
@ -68,15 +68,16 @@ function unmarshal (key) {
|
||||
|
||||
// create a public key protobuf to be base64 string stored in config
|
||||
function marshal (data, type) {
|
||||
var epb
|
||||
if (type === 'Public') {
|
||||
var epb = messages.PublicKey.encode({
|
||||
epb = messages.PublicKey.encode({
|
||||
Type: 0,
|
||||
Data: data
|
||||
})
|
||||
}
|
||||
|
||||
if (type === 'Private') {
|
||||
var epb = messages.PrivateKey.encode({
|
||||
epb = messages.PrivateKey.encode({
|
||||
Type: 0,
|
||||
Data: data
|
||||
})
|
||||
|
@ -16,7 +16,7 @@ const testIdBytes = new Buffer('1220151ab1658d8294ab34b71d5582cfe20d06414212f440
|
||||
const testIdB58String = 'QmQ2zigjQikYnyYUSXZydNXrDRhBut2mubwJBaLXobMt3A'
|
||||
|
||||
describe('id', function (done) {
|
||||
this.timeout(10000)
|
||||
this.timeout(30000)
|
||||
it('create a new id', done => {
|
||||
// this will always be randomly generated. is there something i can test it against?
|
||||
var id = PeerId.create()
|
||||
|
Loading…
x
Reference in New Issue
Block a user