Initial update for the bitmessage-js package #1
15
test.js
15
test.js
|
@ -776,14 +776,13 @@ describe("Object types", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("shouldn't decode getpubkey with insufficient nonce", function(done) {
|
||||
it("shouldn't decode getpubkey with insufficient nonce", function() {
|
||||
return getpubkey.encodeAsync({
|
||||
ttl: 100,
|
||||
to: "2cTux3PGRqHTEH6wyUP2sWeT4LrsGgy63z",
|
||||
skipPow: true,
|
||||
}).then(getpubkey.decodeAsync).catch(function(err) {
|
||||
expect(err.message).to.match(/insufficient/i);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -949,7 +948,7 @@ describe("Object types", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("shouldn't decode msg without identities", function(done) {
|
||||
it("shouldn't decode msg without identities", function() {
|
||||
return msg.encodeAsync({
|
||||
ttl: 111,
|
||||
from: from,
|
||||
|
@ -960,7 +959,6 @@ describe("Object types", function() {
|
|||
return msg.decodeAsync(buf, {identities: [], skipPow: true});
|
||||
}).catch(function(err) {
|
||||
expect(err.message).to.match(/with given identities/i);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -982,7 +980,7 @@ describe("Object types", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("shouldn't encode too big msg", function(done) {
|
||||
it("shouldn't encode too big msg", function() {
|
||||
return msg.encodeAsync({
|
||||
ttl: 111,
|
||||
from: from,
|
||||
|
@ -991,7 +989,6 @@ describe("Object types", function() {
|
|||
skipPow: true,
|
||||
}).catch(function(err) {
|
||||
expect(err.message).to.match(/too big/i);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1099,7 +1096,7 @@ describe("Object types", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("shouldn't decode broadcast without subscriptions", function(done) {
|
||||
it("shouldn't decode broadcast without subscriptions", function() {
|
||||
return broadcast.encodeAsync({
|
||||
ttl: 101,
|
||||
from: from,
|
||||
|
@ -1112,11 +1109,10 @@ describe("Object types", function() {
|
|||
});
|
||||
}).catch(function(err) {
|
||||
expect(err.message).to.match(/not interested/i);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it("shouldn't encode too big broadcast", function(done) {
|
||||
it("shouldn't encode too big broadcast", function() {
|
||||
return broadcast.encodeAsync({
|
||||
ttl: 101,
|
||||
from: from,
|
||||
|
@ -1124,7 +1120,6 @@ describe("Object types", function() {
|
|||
skipPow: true,
|
||||
}).catch(function(err) {
|
||||
expect(err.message).to.match(/too big/i);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user