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

fix: make pubsub unsubscribe tests work in electron renderer #528

Merged
merged 1 commit into from
Sep 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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