Spy seams
A test asserts a private method was called, so # breaks it outright rather than needing a rewrite.
BrowserPool.executeHooks (8 sites), launchBrowser (2), overridePageClose, closeRetiredBrowserWithNoPages, closeInactiveRetiredBrowsers
ConcurrencySystem.autoscale (9) — tests step the autoscaling loop by hand. Also does this.autoscale = this.autoscale.bind(this) in the constructor, which is illegal for a # method; it would have to become a private field holding an arrow function.
SessionPool.ensureInitialized (3), createSession
Internals invoked directly
No public path to the behaviour under test.
crawlee/prefer-private-fieldsflags them toomaster, there's 200+ private methodsprefer-private-fieldsan error instead of warningSpy seams
A test asserts a private method was called, so
#breaks it outright rather than needing a rewrite.BrowserPool.executeHooks(8 sites),launchBrowser(2),overridePageClose,closeRetiredBrowserWithNoPages,closeInactiveRetiredBrowsersConcurrencySystem.autoscale(9) — tests step the autoscaling loop by hand. Also doesthis.autoscale = this.autoscale.bind(this)in the constructor, which is illegal for a#method; it would have to become a private field holding an arrow function.SessionPool.ensureInitialized(3),createSessionInternals invoked directly
No public path to the behaviour under test.
BasicCrawler.resolveRequestHandlerTimeoutMillis— currently the only handle on the 2^31-1 clamp, see refactor(core): retire TS-private test seams and convert to native private fields #4043BasicCrawler.isTaskReadyFunction,runInStorageTransaction,isAllowedBasedOnRobotsTxtFile(2)HttpCrawler.encodeResponse(2)ImpitHttpClient.getClient(4) — asserts per-proxy client cachingBrowserLauncher.getTypicalChromeExecutablePath(3)StagehandController.waitForStagehandToRegisterPage(2)Dataset.bufferedJournalEntries/KeyValueStore.bufferedJournalEntriesRelated: Unify naming conventions for protected/private class members #3108, refactor!: use native private class fields and remove underscore prefixes #3980, Redesign or retire the remaining test seams that reach into private members #3983