Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit eedfe3d

Browse files
committed
fix: make pubsub unsubscribe tests work in electron renderer
1 parent 16b5412 commit eedfe3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pubsub/unsubscribe.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env mocha */
22
'use strict'
33

4-
const { isBrowser, isWebWorker } = require('ipfs-utils/src/env')
4+
const { isBrowser, isWebWorker, isElectronRenderer } = require('ipfs-utils/src/env')
55
const { getTopic } = require('./utils')
66
const { getDescribe, getIt, expect } = require('../utils/mocha')
77
const delay = require('../utils/delay')
@@ -34,7 +34,7 @@ module.exports = (createCommon, options) => {
3434
after((done) => common.teardown(done))
3535

3636
// Browser/worker has max ~5 open HTTP requests to the same origin
37-
const count = isBrowser || isWebWorker ? 5 : 10
37+
const count = isBrowser || isWebWorker || isElectronRenderer ? 5 : 10
3838

3939
it(`should subscribe and unsubscribe ${count} times`, async () => {
4040
const someTopic = getTopic()

0 commit comments

Comments
 (0)