Remove excessive done() in test
This commit is contained in:
parent
095bc95660
commit
7b38bbc5ad
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({
|
return getpubkey.encodeAsync({
|
||||||
ttl: 100,
|
ttl: 100,
|
||||||
to: "2cTux3PGRqHTEH6wyUP2sWeT4LrsGgy63z",
|
to: "2cTux3PGRqHTEH6wyUP2sWeT4LrsGgy63z",
|
||||||
skipPow: true,
|
skipPow: true,
|
||||||
}).then(getpubkey.decodeAsync).catch(function(err) {
|
}).then(getpubkey.decodeAsync).catch(function(err) {
|
||||||
expect(err.message).to.match(/insufficient/i);
|
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({
|
return msg.encodeAsync({
|
||||||
ttl: 111,
|
ttl: 111,
|
||||||
from: from,
|
from: from,
|
||||||
|
@ -960,7 +959,6 @@ describe("Object types", function() {
|
||||||
return msg.decodeAsync(buf, {identities: [], skipPow: true});
|
return msg.decodeAsync(buf, {identities: [], skipPow: true});
|
||||||
}).catch(function(err) {
|
}).catch(function(err) {
|
||||||
expect(err.message).to.match(/with given identities/i);
|
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({
|
return msg.encodeAsync({
|
||||||
ttl: 111,
|
ttl: 111,
|
||||||
from: from,
|
from: from,
|
||||||
|
@ -991,7 +989,6 @@ describe("Object types", function() {
|
||||||
skipPow: true,
|
skipPow: true,
|
||||||
}).catch(function(err) {
|
}).catch(function(err) {
|
||||||
expect(err.message).to.match(/too big/i);
|
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({
|
return broadcast.encodeAsync({
|
||||||
ttl: 101,
|
ttl: 101,
|
||||||
from: from,
|
from: from,
|
||||||
|
@ -1112,11 +1109,10 @@ describe("Object types", function() {
|
||||||
});
|
});
|
||||||
}).catch(function(err) {
|
}).catch(function(err) {
|
||||||
expect(err.message).to.match(/not interested/i);
|
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({
|
return broadcast.encodeAsync({
|
||||||
ttl: 101,
|
ttl: 101,
|
||||||
from: from,
|
from: from,
|
||||||
|
@ -1124,7 +1120,6 @@ describe("Object types", function() {
|
||||||
skipPow: true,
|
skipPow: true,
|
||||||
}).catch(function(err) {
|
}).catch(function(err) {
|
||||||
expect(err.message).to.match(/too big/i);
|
expect(err.message).to.match(/too big/i);
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user