mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-18 11:41:21 +00:00
fix: improve config defaults (#409)
This removes defaults from superstruct and instead uses mergeOptions to deeply set the defaults on configuration. This ensures that defaults are properly set. This is a step toward removing superstruct altogether, #406, but it is still being used for basic type validation.
This commit is contained in:
@ -376,7 +376,7 @@ describe('.pubsub', () => {
|
||||
constructor (node, config) {
|
||||
expect(config).to.be.eql({
|
||||
enabled: true,
|
||||
selfEmit: false,
|
||||
emitSelf: false,
|
||||
signMessages: false,
|
||||
strictSigning: false
|
||||
}).mark()
|
||||
@ -390,7 +390,7 @@ describe('.pubsub', () => {
|
||||
config: {
|
||||
pubsub: {
|
||||
enabled: true,
|
||||
selfEmit: false,
|
||||
emitSelf: false,
|
||||
signMessages: false,
|
||||
strictSigning: false
|
||||
}
|
||||
@ -408,7 +408,7 @@ describe('.pubsub', () => {
|
||||
constructor (node, config) {
|
||||
expect(config).to.be.eql({
|
||||
enabled: true,
|
||||
selfEmit: true,
|
||||
emitSelf: true,
|
||||
signMessages: true,
|
||||
strictSigning: true
|
||||
}).mark()
|
||||
@ -422,7 +422,7 @@ describe('.pubsub', () => {
|
||||
config: {
|
||||
pubsub: {
|
||||
enabled: true,
|
||||
selfEmit: true,
|
||||
emitSelf: true,
|
||||
signMessages: true,
|
||||
strictSigning: true
|
||||
}
|
||||
|
Reference in New Issue
Block a user