From de36ca24526eef16d71949ba44bc26a2adc37137 Mon Sep 17 00:00:00 2001 From: Zach Bloomquist Date: Tue, 21 Jan 2020 15:56:57 -0500 Subject: [PATCH] add test that getFirefoxGcInterval is correctly mounted --- .../integration/util/firefox_forced_gc_spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/driver/test/cypress/integration/util/firefox_forced_gc_spec.ts b/packages/driver/test/cypress/integration/util/firefox_forced_gc_spec.ts index defeabe54d6d..7dd7d79aedea 100644 --- a/packages/driver/test/cypress/integration/util/firefox_forced_gc_spec.ts +++ b/packages/driver/test/cypress/integration/util/firefox_forced_gc_spec.ts @@ -52,6 +52,19 @@ describe('driver/src/util/firefox_forced_gc', () => { isInteractive: false, })).to.eq(10) }) + + it('has been correctly mounted at Cypress.getFirefoxGcInterval', () => { + const oldGcInterval = Cypress.config('firefoxGcInterval') + + Cypress.config('firefoxGcInterval', 5) + + const real = Cypress.getFirefoxGcInterval + const fake = createIntervalGetter(Cypress.config) + + expect(real()).to.eq(fake()).and.eq(5) + + Cypress.config('firefoxGcInterval', oldGcInterval) + }) }) describe('#install', () => {