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