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

Commit

Permalink
fix: make pubsub unsubscribe tests work in electron renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Sep 13, 2019
1 parent 16b5412 commit eedfe3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pubsub/unsubscribe.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env mocha */
'use strict'

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

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

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

0 comments on commit eedfe3d

Please sign in to comment.