mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-25 01:49:06 -05:00
Handle case where firefoxGcIntervals could be set to null (#6826)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { get, isNumber } from 'lodash'
|
||||
import { get, isNumber, isNull } from 'lodash'
|
||||
|
||||
export function createIntervalGetter (config) {
|
||||
return () => {
|
||||
@@ -8,7 +8,7 @@ export function createIntervalGetter (config) {
|
||||
|
||||
const intervals = config('firefoxGcInterval')
|
||||
|
||||
if (isNumber(intervals)) {
|
||||
if (isNumber(intervals) || isNull(intervals)) {
|
||||
return intervals
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,15 @@ describe('driver/src/util/firefox_forced_gc', () => {
|
||||
})).to.eq(99)
|
||||
})
|
||||
|
||||
it('returns null if firefoxGcInterval is null', () => {
|
||||
expect(run({
|
||||
browser: {
|
||||
family: 'firefox',
|
||||
},
|
||||
firefoxGcInterval: null,
|
||||
})).to.eq(null)
|
||||
})
|
||||
|
||||
it('returns the appropriate interval for open mode', () => {
|
||||
expect(run({
|
||||
browser: {
|
||||
|
||||
Reference in New Issue
Block a user