mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-17 11:11:21 +00:00
test(fix): correct findProviders test for missing provider (#391)
* test(fix): correct findProviders test for missing provider * chore: fix lint
This commit is contained in:
@ -24,7 +24,7 @@ describe('private network', () => {
|
||||
config = {
|
||||
peerInfo,
|
||||
modules: {
|
||||
transport: [ WS ],
|
||||
transport: [WS],
|
||||
dht: DHT
|
||||
}
|
||||
}
|
||||
@ -50,14 +50,14 @@ describe('private network', () => {
|
||||
|
||||
it('should create a libp2p node with a provided protector', () => {
|
||||
let node
|
||||
let protector = {
|
||||
const protector = {
|
||||
psk: '123',
|
||||
tag: '/psk/1.0.0',
|
||||
protect: () => { }
|
||||
}
|
||||
|
||||
expect(() => {
|
||||
let options = defaultsDeep(config, {
|
||||
const options = defaultsDeep(config, {
|
||||
modules: {
|
||||
connProtector: protector
|
||||
}
|
||||
@ -71,7 +71,7 @@ describe('private network', () => {
|
||||
|
||||
it('should throw an error if the protector does not have a protect method', () => {
|
||||
expect(() => {
|
||||
let options = defaultsDeep(config, {
|
||||
const options = defaultsDeep(config, {
|
||||
modules: {
|
||||
connProtector: { }
|
||||
}
|
||||
|
Reference in New Issue
Block a user