Remove excessive done() in test

This commit is contained in:
Lee Miller 2024-03-03 22:27:06 +02:00
parent 095bc95660
commit 7b38bbc5ad
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
1 changed files with 5 additions and 10 deletions

15
test.js
View File

@ -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();
});
});