@browsermation/browser-engine 0.0.12 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/playwright/LICENSE +202 -0
- package/dist/node_modules/playwright/NOTICE +5 -0
- package/dist/node_modules/playwright/README.md +168 -0
- package/dist/node_modules/playwright/ThirdPartyNotices.txt +6197 -0
- package/dist/node_modules/playwright/cli.js +19 -0
- package/dist/node_modules/playwright/index.d.ts +17 -0
- package/dist/node_modules/playwright/index.js +17 -0
- package/dist/node_modules/playwright/index.mjs +18 -0
- package/dist/node_modules/playwright/jsx-runtime.js +42 -0
- package/dist/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/dist/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/dist/node_modules/playwright/lib/agents/generateAgents.js +395 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +55 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +72 -0
- package/dist/node_modules/playwright/lib/common/config.js +280 -0
- package/dist/node_modules/playwright/lib/common/configLoader.js +344 -0
- package/dist/node_modules/playwright/lib/common/esmLoaderHost.js +102 -0
- package/dist/node_modules/playwright/lib/common/expectBundle.js +43 -0
- package/dist/node_modules/playwright/lib/common/expectBundleImpl.js +407 -0
- package/dist/node_modules/playwright/lib/common/fixtures.js +302 -0
- package/dist/node_modules/playwright/lib/common/globals.js +58 -0
- package/dist/node_modules/playwright/lib/common/ipc.js +60 -0
- package/dist/node_modules/playwright/lib/common/poolBuilder.js +85 -0
- package/dist/node_modules/playwright/lib/common/process.js +104 -0
- package/dist/node_modules/playwright/lib/common/suiteUtils.js +140 -0
- package/dist/node_modules/playwright/lib/common/test.js +321 -0
- package/dist/node_modules/playwright/lib/common/testLoader.js +101 -0
- package/dist/node_modules/playwright/lib/common/testType.js +298 -0
- package/dist/node_modules/playwright/lib/common/validators.js +68 -0
- package/dist/node_modules/playwright/lib/fsWatcher.js +67 -0
- package/dist/node_modules/playwright/lib/index.js +682 -0
- package/dist/node_modules/playwright/lib/internalsForTest.js +42 -0
- package/dist/node_modules/playwright/lib/isomorphic/events.js +77 -0
- package/dist/node_modules/playwright/lib/isomorphic/folders.js +30 -0
- package/dist/node_modules/playwright/lib/isomorphic/stringInternPool.js +69 -0
- package/dist/node_modules/playwright/lib/isomorphic/teleReceiver.js +508 -0
- package/dist/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +137 -0
- package/dist/node_modules/playwright/lib/isomorphic/testServerConnection.js +225 -0
- package/dist/node_modules/playwright/lib/isomorphic/testServerInterface.js +16 -0
- package/dist/node_modules/playwright/lib/isomorphic/testTree.js +334 -0
- package/dist/node_modules/playwright/lib/isomorphic/types.d.js +16 -0
- package/dist/node_modules/playwright/lib/loader/loaderMain.js +59 -0
- package/dist/node_modules/playwright/lib/matchers/expect.js +324 -0
- package/dist/node_modules/playwright/lib/matchers/matcherHint.js +87 -0
- package/dist/node_modules/playwright/lib/matchers/matchers.js +382 -0
- package/dist/node_modules/playwright/lib/matchers/toBeTruthy.js +73 -0
- package/dist/node_modules/playwright/lib/matchers/toEqual.js +99 -0
- package/dist/node_modules/playwright/lib/matchers/toHaveURL.js +102 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchSnapshot.js +341 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchText.js +99 -0
- package/dist/node_modules/playwright/lib/mcp/browser/actions.d.js +16 -0
- package/dist/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +296 -0
- package/dist/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +76 -0
- package/dist/node_modules/playwright/lib/mcp/browser/codegen.js +66 -0
- package/dist/node_modules/playwright/lib/mcp/browser/config.js +368 -0
- package/dist/node_modules/playwright/lib/mcp/browser/context.js +267 -0
- package/dist/node_modules/playwright/lib/mcp/browser/response.js +237 -0
- package/dist/node_modules/playwright/lib/mcp/browser/sessionLog.js +160 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tab.js +292 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/common.js +63 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/console.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +60 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +69 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/files.js +58 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/form.js +73 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/install.js +69 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +84 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/mouse.js +107 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/navigate.js +62 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/network.js +54 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/pdf.js +59 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/runCode.js +75 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +106 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +181 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tabs.js +67 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tool.js +49 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tracing.js +74 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/utils.js +89 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/verify.js +153 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/wait.js +63 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools.js +82 -0
- package/dist/node_modules/playwright/lib/mcp/browser/watchdog.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/config.d.js +16 -0
- package/dist/node_modules/playwright/lib/mcp/extension/cdpRelay.js +351 -0
- package/dist/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +75 -0
- package/dist/node_modules/playwright/lib/mcp/extension/protocol.js +28 -0
- package/dist/node_modules/playwright/lib/mcp/index.js +61 -0
- package/dist/node_modules/playwright/lib/mcp/log.js +35 -0
- package/dist/node_modules/playwright/lib/mcp/program.js +116 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/bundle.js +81 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/exports.js +30 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/http.js +187 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/proxyBackend.js +128 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/server.js +198 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/tool.js +47 -0
- package/dist/node_modules/playwright/lib/mcp/test/browserBackend.js +108 -0
- package/dist/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/dist/node_modules/playwright/lib/mcp/test/plannerTools.js +144 -0
- package/dist/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/dist/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/dist/node_modules/playwright/lib/mcp/test/testContext.js +279 -0
- package/dist/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/dist/node_modules/playwright/lib/mcp/test/testTools.js +106 -0
- package/dist/node_modules/playwright/lib/mcpBundleImpl.js +41 -0
- package/dist/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/dist/node_modules/playwright/lib/plugins/index.js +28 -0
- package/dist/node_modules/playwright/lib/plugins/webServerPlugin.js +237 -0
- package/dist/node_modules/playwright/lib/program.js +403 -0
- package/dist/node_modules/playwright/lib/reporters/base.js +609 -0
- package/dist/node_modules/playwright/lib/reporters/blob.js +135 -0
- package/dist/node_modules/playwright/lib/reporters/dot.js +82 -0
- package/dist/node_modules/playwright/lib/reporters/empty.js +32 -0
- package/dist/node_modules/playwright/lib/reporters/github.js +128 -0
- package/dist/node_modules/playwright/lib/reporters/html.js +623 -0
- package/dist/node_modules/playwright/lib/reporters/internalReporter.js +132 -0
- package/dist/node_modules/playwright/lib/reporters/json.js +254 -0
- package/dist/node_modules/playwright/lib/reporters/junit.js +232 -0
- package/dist/node_modules/playwright/lib/reporters/line.js +113 -0
- package/dist/node_modules/playwright/lib/reporters/list.js +231 -0
- package/dist/node_modules/playwright/lib/reporters/listModeReporter.js +69 -0
- package/dist/node_modules/playwright/lib/reporters/markdown.js +144 -0
- package/dist/node_modules/playwright/lib/reporters/merge.js +541 -0
- package/dist/node_modules/playwright/lib/reporters/multiplexer.js +104 -0
- package/dist/node_modules/playwright/lib/reporters/reporterV2.js +102 -0
- package/dist/node_modules/playwright/lib/reporters/teleEmitter.js +299 -0
- package/dist/node_modules/playwright/lib/reporters/versions/blobV1.js +16 -0
- package/dist/node_modules/playwright/lib/runner/dispatcher.js +515 -0
- package/dist/node_modules/playwright/lib/runner/failureTracker.js +72 -0
- package/dist/node_modules/playwright/lib/runner/lastRun.js +77 -0
- package/dist/node_modules/playwright/lib/runner/loadUtils.js +334 -0
- package/dist/node_modules/playwright/lib/runner/loaderHost.js +89 -0
- package/dist/node_modules/playwright/lib/runner/processHost.js +161 -0
- package/dist/node_modules/playwright/lib/runner/projectUtils.js +241 -0
- package/dist/node_modules/playwright/lib/runner/rebase.js +189 -0
- package/dist/node_modules/playwright/lib/runner/reporters.js +138 -0
- package/dist/node_modules/playwright/lib/runner/sigIntWatcher.js +96 -0
- package/dist/node_modules/playwright/lib/runner/taskRunner.js +127 -0
- package/dist/node_modules/playwright/lib/runner/tasks.js +410 -0
- package/dist/node_modules/playwright/lib/runner/testGroups.js +117 -0
- package/dist/node_modules/playwright/lib/runner/testRunner.js +389 -0
- package/dist/node_modules/playwright/lib/runner/testServer.js +269 -0
- package/dist/node_modules/playwright/lib/runner/uiModeReporter.js +30 -0
- package/dist/node_modules/playwright/lib/runner/vcs.js +72 -0
- package/dist/node_modules/playwright/lib/runner/watchMode.js +395 -0
- package/dist/node_modules/playwright/lib/runner/workerHost.js +98 -0
- package/dist/node_modules/playwright/lib/third_party/pirates.js +62 -0
- package/dist/node_modules/playwright/lib/third_party/tsconfig-loader.js +103 -0
- package/dist/node_modules/playwright/lib/transform/babelBundle.js +43 -0
- package/dist/node_modules/playwright/lib/transform/babelBundleImpl.js +461 -0
- package/dist/node_modules/playwright/lib/transform/compilationCache.js +272 -0
- package/dist/node_modules/playwright/lib/transform/esmLoader.js +104 -0
- package/dist/node_modules/playwright/lib/transform/portTransport.js +67 -0
- package/dist/node_modules/playwright/lib/transform/transform.js +293 -0
- package/dist/node_modules/playwright/lib/util.js +403 -0
- package/dist/node_modules/playwright/lib/utilsBundle.js +43 -0
- package/dist/node_modules/playwright/lib/utilsBundleImpl.js +100 -0
- package/dist/node_modules/playwright/lib/worker/fixtureRunner.js +258 -0
- package/dist/node_modules/playwright/lib/worker/testInfo.js +516 -0
- package/dist/node_modules/playwright/lib/worker/testTracing.js +345 -0
- package/dist/node_modules/playwright/lib/worker/timeoutManager.js +174 -0
- package/dist/node_modules/playwright/lib/worker/util.js +31 -0
- package/dist/node_modules/playwright/lib/worker/workerMain.js +529 -0
- package/dist/node_modules/playwright/package.json +72 -0
- package/dist/node_modules/playwright/test.d.ts +18 -0
- package/dist/node_modules/playwright/test.js +24 -0
- package/dist/node_modules/playwright/test.mjs +33 -0
- package/dist/node_modules/playwright/types/test.d.ts +10253 -0
- package/dist/node_modules/playwright/types/testReporter.d.ts +821 -0
- package/dist/node_modules/playwright-core/LICENSE +202 -0
- package/dist/node_modules/playwright-core/NOTICE +5 -0
- package/dist/node_modules/playwright-core/README.md +3 -0
- package/dist/node_modules/playwright-core/ThirdPartyNotices.txt +1161 -0
- package/dist/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/dist/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/browsers.json +80 -0
- package/dist/node_modules/playwright-core/cli.js +18 -0
- package/dist/node_modules/playwright-core/index.d.ts +17 -0
- package/dist/node_modules/playwright-core/index.js +32 -0
- package/dist/node_modules/playwright-core/index.mjs +28 -0
- package/dist/node_modules/playwright-core/lib/androidServerImpl.js +65 -0
- package/dist/node_modules/playwright-core/lib/browserServerImpl.js +120 -0
- package/dist/node_modules/playwright-core/lib/cli/driver.js +97 -0
- package/dist/node_modules/playwright-core/lib/cli/program.js +590 -0
- package/dist/node_modules/playwright-core/lib/cli/programWithTestStub.js +74 -0
- package/dist/node_modules/playwright-core/lib/client/android.js +361 -0
- package/dist/node_modules/playwright-core/lib/client/api.js +134 -0
- package/dist/node_modules/playwright-core/lib/client/artifact.js +79 -0
- package/dist/node_modules/playwright-core/lib/client/browser.js +163 -0
- package/dist/node_modules/playwright-core/lib/client/browserContext.js +547 -0
- package/dist/node_modules/playwright-core/lib/client/browserType.js +184 -0
- package/dist/node_modules/playwright-core/lib/client/cdpSession.js +51 -0
- package/dist/node_modules/playwright-core/lib/client/channelOwner.js +194 -0
- package/dist/node_modules/playwright-core/lib/client/clientHelper.js +64 -0
- package/dist/node_modules/playwright-core/lib/client/clientInstrumentation.js +55 -0
- package/dist/node_modules/playwright-core/lib/client/clientStackTrace.js +69 -0
- package/dist/node_modules/playwright-core/lib/client/clock.js +68 -0
- package/dist/node_modules/playwright-core/lib/client/connection.js +314 -0
- package/dist/node_modules/playwright-core/lib/client/consoleMessage.js +58 -0
- package/dist/node_modules/playwright-core/lib/client/coverage.js +44 -0
- package/dist/node_modules/playwright-core/lib/client/dialog.js +56 -0
- package/dist/node_modules/playwright-core/lib/client/download.js +62 -0
- package/dist/node_modules/playwright-core/lib/client/electron.js +138 -0
- package/dist/node_modules/playwright-core/lib/client/elementHandle.js +281 -0
- package/dist/node_modules/playwright-core/lib/client/errors.js +77 -0
- package/dist/node_modules/playwright-core/lib/client/eventEmitter.js +314 -0
- package/dist/node_modules/playwright-core/lib/client/events.js +100 -0
- package/dist/node_modules/playwright-core/lib/client/fetch.js +369 -0
- package/dist/node_modules/playwright-core/lib/client/fileChooser.js +46 -0
- package/dist/node_modules/playwright-core/lib/client/fileUtils.js +34 -0
- package/dist/node_modules/playwright-core/lib/client/frame.js +408 -0
- package/dist/node_modules/playwright-core/lib/client/harRouter.js +87 -0
- package/dist/node_modules/playwright-core/lib/client/input.js +84 -0
- package/dist/node_modules/playwright-core/lib/client/jsHandle.js +109 -0
- package/dist/node_modules/playwright-core/lib/client/jsonPipe.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/localUtils.js +60 -0
- package/dist/node_modules/playwright-core/lib/client/locator.js +369 -0
- package/dist/node_modules/playwright-core/lib/client/network.js +747 -0
- package/dist/node_modules/playwright-core/lib/client/page.js +718 -0
- package/dist/node_modules/playwright-core/lib/client/platform.js +74 -0
- package/dist/node_modules/playwright-core/lib/client/playwright.js +71 -0
- package/dist/node_modules/playwright-core/lib/client/selectors.js +55 -0
- package/dist/node_modules/playwright-core/lib/client/stream.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/timeoutSettings.js +79 -0
- package/dist/node_modules/playwright-core/lib/client/tracing.js +119 -0
- package/dist/node_modules/playwright-core/lib/client/types.js +28 -0
- package/dist/node_modules/playwright-core/lib/client/video.js +59 -0
- package/dist/node_modules/playwright-core/lib/client/waiter.js +142 -0
- package/dist/node_modules/playwright-core/lib/client/webError.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/webSocket.js +93 -0
- package/dist/node_modules/playwright-core/lib/client/worker.js +85 -0
- package/dist/node_modules/playwright-core/lib/client/writableStream.js +39 -0
- package/dist/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/clockSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/injectedScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/storageScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/utilityScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/webSocketMockSource.js +336 -0
- package/dist/node_modules/playwright-core/lib/inProcessFactory.js +60 -0
- package/dist/node_modules/playwright-core/lib/inprocess.js +3 -0
- package/dist/node_modules/playwright-core/lib/outofprocess.js +76 -0
- package/dist/node_modules/playwright-core/lib/protocol/serializers.js +192 -0
- package/dist/node_modules/playwright-core/lib/protocol/validator.js +2890 -0
- package/dist/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
- package/dist/node_modules/playwright-core/lib/remote/playwrightConnection.js +129 -0
- package/dist/node_modules/playwright-core/lib/remote/playwrightServer.js +335 -0
- package/dist/node_modules/playwright-core/lib/server/android/android.js +465 -0
- package/dist/node_modules/playwright-core/lib/server/android/backendAdb.js +177 -0
- package/dist/node_modules/playwright-core/lib/server/artifact.js +127 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +505 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +153 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +212 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +221 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +130 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiInput.js +146 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiPage.js +572 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiDeserializer.js +98 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +179 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/dist/node_modules/playwright-core/lib/server/browser.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/browserContext.js +695 -0
- package/dist/node_modules/playwright-core/lib/server/browserType.js +328 -0
- package/dist/node_modules/playwright-core/lib/server/callLog.js +82 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/chromium.js +402 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +104 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crBrowser.js +510 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crConnection.js +202 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crCoverage.js +235 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crDevTools.js +113 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crInput.js +187 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +666 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crPage.js +1069 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crPdf.js +121 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +136 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/videoRecorder.js +115 -0
- package/dist/node_modules/playwright-core/lib/server/clock.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/csharp.js +327 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/java.js +274 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/javascript.js +270 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/jsonl.js +52 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/language.js +132 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/languages.js +68 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/python.js +279 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/types.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/console.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/cookieStore.js +206 -0
- package/dist/node_modules/playwright-core/lib/server/debugController.js +191 -0
- package/dist/node_modules/playwright-core/lib/server/debugger.js +119 -0
- package/dist/node_modules/playwright-core/lib/server/deviceDescriptors.js +39 -0
- package/dist/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
- package/dist/node_modules/playwright-core/lib/server/dialog.js +116 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +381 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +371 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +389 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/dist/node_modules/playwright-core/lib/server/dom.js +806 -0
- package/dist/node_modules/playwright-core/lib/server/download.js +70 -0
- package/dist/node_modules/playwright-core/lib/server/electron/electron.js +270 -0
- package/dist/node_modules/playwright-core/lib/server/electron/loader.js +29 -0
- package/dist/node_modules/playwright-core/lib/server/errors.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/fetch.js +621 -0
- package/dist/node_modules/playwright-core/lib/server/fileChooser.js +43 -0
- package/dist/node_modules/playwright-core/lib/server/fileUploadUtils.js +84 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +428 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffConnection.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffInput.js +159 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffPage.js +500 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/firefox.js +116 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/formData.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/frameSelectors.js +154 -0
- package/dist/node_modules/playwright-core/lib/server/frames.js +1455 -0
- package/dist/node_modules/playwright-core/lib/server/har/harRecorder.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/har/harTracer.js +607 -0
- package/dist/node_modules/playwright-core/lib/server/harBackend.js +157 -0
- package/dist/node_modules/playwright-core/lib/server/helper.js +96 -0
- package/dist/node_modules/playwright-core/lib/server/index.js +58 -0
- package/dist/node_modules/playwright-core/lib/server/input.js +277 -0
- package/dist/node_modules/playwright-core/lib/server/instrumentation.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/javascript.js +291 -0
- package/dist/node_modules/playwright-core/lib/server/launchApp.js +128 -0
- package/dist/node_modules/playwright-core/lib/server/localUtils.js +214 -0
- package/dist/node_modules/playwright-core/lib/server/macEditingCommands.js +143 -0
- package/dist/node_modules/playwright-core/lib/server/network.js +629 -0
- package/dist/node_modules/playwright-core/lib/server/page.js +886 -0
- package/dist/node_modules/playwright-core/lib/server/pipeTransport.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/playwright.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/progress.js +112 -0
- package/dist/node_modules/playwright-core/lib/server/protocolError.js +52 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/chat.js +161 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderApp.js +387 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/throttledFile.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/recorder.js +499 -0
- package/dist/node_modules/playwright-core/lib/server/registry/browserFetcher.js +175 -0
- package/dist/node_modules/playwright-core/lib/server/registry/dependencies.js +371 -0
- package/dist/node_modules/playwright-core/lib/server/registry/index.js +1399 -0
- package/dist/node_modules/playwright-core/lib/server/registry/nativeDeps.js +1280 -0
- package/dist/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +124 -0
- package/dist/node_modules/playwright-core/lib/server/screenshotter.js +333 -0
- package/dist/node_modules/playwright-core/lib/server/selectors.js +112 -0
- package/dist/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/dist/node_modules/playwright-core/lib/server/socksInterceptor.js +95 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +541 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +604 -0
- package/dist/node_modules/playwright-core/lib/server/trace/test/inMemorySnapshotter.js +87 -0
- package/dist/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +241 -0
- package/dist/node_modules/playwright-core/lib/server/transport.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/types.js +28 -0
- package/dist/node_modules/playwright-core/lib/server/usKeyboardLayout.js +145 -0
- package/dist/node_modules/playwright-core/lib/server/utils/ascii.js +44 -0
- package/dist/node_modules/playwright-core/lib/server/utils/comparators.js +139 -0
- package/dist/node_modules/playwright-core/lib/server/utils/crypto.js +216 -0
- package/dist/node_modules/playwright-core/lib/server/utils/debug.js +42 -0
- package/dist/node_modules/playwright-core/lib/server/utils/debugLogger.js +122 -0
- package/dist/node_modules/playwright-core/lib/server/utils/env.js +73 -0
- package/dist/node_modules/playwright-core/lib/server/utils/eventsHelper.js +39 -0
- package/dist/node_modules/playwright-core/lib/server/utils/expectUtils.js +38 -0
- package/dist/node_modules/playwright-core/lib/server/utils/fileUtils.js +191 -0
- package/dist/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
- package/dist/node_modules/playwright-core/lib/server/utils/hostPlatform.js +123 -0
- package/dist/node_modules/playwright-core/lib/server/utils/httpServer.js +218 -0
- package/dist/node_modules/playwright-core/lib/server/utils/imageUtils.js +141 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
- package/dist/node_modules/playwright-core/lib/server/utils/linuxUtils.js +71 -0
- package/dist/node_modules/playwright-core/lib/server/utils/network.js +233 -0
- package/dist/node_modules/playwright-core/lib/server/utils/nodePlatform.js +148 -0
- package/dist/node_modules/playwright-core/lib/server/utils/pipeTransport.js +84 -0
- package/dist/node_modules/playwright-core/lib/server/utils/processLauncher.js +241 -0
- package/dist/node_modules/playwright-core/lib/server/utils/profiler.js +65 -0
- package/dist/node_modules/playwright-core/lib/server/utils/socksProxy.js +511 -0
- package/dist/node_modules/playwright-core/lib/server/utils/spawnAsync.js +41 -0
- package/dist/node_modules/playwright-core/lib/server/utils/task.js +51 -0
- package/dist/node_modules/playwright-core/lib/server/utils/userAgent.js +98 -0
- package/dist/node_modules/playwright-core/lib/server/utils/wsServer.js +121 -0
- package/dist/node_modules/playwright-core/lib/server/utils/zipFile.js +74 -0
- package/dist/node_modules/playwright-core/lib/server/utils/zones.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/webkit.js +110 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +339 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkConnection.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkInput.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +169 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkPage.js +1130 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +105 -0
- package/dist/node_modules/playwright-core/lib/third_party/pixelmatch.js +255 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +397 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/assert.js +31 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/colors.js +72 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/headers.js +53 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +322 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +155 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/time.js +49 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/types.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +190 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/dist/node_modules/playwright-core/lib/utils.js +109 -0
- package/dist/node_modules/playwright-core/lib/utilsBundle.js +112 -0
- package/dist/node_modules/playwright-core/lib/utilsBundleImpl/index.js +218 -0
- package/dist/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
- package/dist/node_modules/playwright-core/lib/vite/htmlReport/index.html +84 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-BoWUGj0J.js +25 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/index-DJqDAOZp.js +193 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/index-Ri0uHF7I.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-Bucv2d7q.js +25 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BEpdCv1S.js +266 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.ConWv5KN.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.BxQ34UMZ.js +2 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.C4Y3Aw8n.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.html +43 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +21 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +3 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.BWTwXl41.js +5 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +17 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/dist/node_modules/playwright-core/lib/zipBundle.js +34 -0
- package/dist/node_modules/playwright-core/lib/zipBundleImpl.js +5 -0
- package/dist/node_modules/playwright-core/package.json +42 -0
- package/dist/node_modules/playwright-core/types/protocol.d.ts +23245 -0
- package/dist/node_modules/playwright-core/types/structs.d.ts +45 -0
- package/dist/node_modules/playwright-core/types/types.d.ts +22856 -0
- package/dist/server.obf.js +1 -1
- package/package.json +11 -12
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var suiteUtils_exports = {};
|
|
30
|
+
__export(suiteUtils_exports, {
|
|
31
|
+
applyRepeatEachIndex: () => applyRepeatEachIndex,
|
|
32
|
+
bindFileSuiteToProject: () => bindFileSuiteToProject,
|
|
33
|
+
filterByFocusedLine: () => filterByFocusedLine,
|
|
34
|
+
filterOnly: () => filterOnly,
|
|
35
|
+
filterSuite: () => filterSuite,
|
|
36
|
+
filterTestsRemoveEmptySuites: () => filterTestsRemoveEmptySuites
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(suiteUtils_exports);
|
|
39
|
+
var import_path = __toESM(require("path"));
|
|
40
|
+
var import_utils = require("playwright-core/lib/utils");
|
|
41
|
+
var import_util = require("../util");
|
|
42
|
+
function filterSuite(suite, suiteFilter, testFilter) {
|
|
43
|
+
for (const child of suite.suites) {
|
|
44
|
+
if (!suiteFilter(child))
|
|
45
|
+
filterSuite(child, suiteFilter, testFilter);
|
|
46
|
+
}
|
|
47
|
+
const filteredTests = suite.tests.filter(testFilter);
|
|
48
|
+
const entries = /* @__PURE__ */ new Set([...suite.suites, ...filteredTests]);
|
|
49
|
+
suite._entries = suite._entries.filter((e) => entries.has(e));
|
|
50
|
+
}
|
|
51
|
+
function filterTestsRemoveEmptySuites(suite, filter) {
|
|
52
|
+
const filteredSuites = suite.suites.filter((child) => filterTestsRemoveEmptySuites(child, filter));
|
|
53
|
+
const filteredTests = suite.tests.filter(filter);
|
|
54
|
+
const entries = /* @__PURE__ */ new Set([...filteredSuites, ...filteredTests]);
|
|
55
|
+
suite._entries = suite._entries.filter((e) => entries.has(e));
|
|
56
|
+
return !!suite._entries.length;
|
|
57
|
+
}
|
|
58
|
+
function bindFileSuiteToProject(project, suite) {
|
|
59
|
+
const relativeFile = import_path.default.relative(project.project.testDir, suite.location.file);
|
|
60
|
+
const fileId = (0, import_utils.calculateSha1)((0, import_utils.toPosixPath)(relativeFile)).slice(0, 20);
|
|
61
|
+
const result = suite._deepClone();
|
|
62
|
+
result._fileId = fileId;
|
|
63
|
+
result.forEachTest((test, suite2) => {
|
|
64
|
+
suite2._fileId = fileId;
|
|
65
|
+
const [file, ...titles] = test.titlePath();
|
|
66
|
+
const testIdExpression = `[project=${project.id}]${(0, import_utils.toPosixPath)(file)}${titles.join("")}`;
|
|
67
|
+
const testId = fileId + "-" + (0, import_utils.calculateSha1)(testIdExpression).slice(0, 20);
|
|
68
|
+
test.id = testId;
|
|
69
|
+
test._projectId = project.id;
|
|
70
|
+
let inheritedRetries;
|
|
71
|
+
let inheritedTimeout;
|
|
72
|
+
for (let parentSuite = suite2; parentSuite; parentSuite = parentSuite.parent) {
|
|
73
|
+
if (parentSuite._staticAnnotations.length)
|
|
74
|
+
test.annotations.unshift(...parentSuite._staticAnnotations);
|
|
75
|
+
if (inheritedRetries === void 0 && parentSuite._retries !== void 0)
|
|
76
|
+
inheritedRetries = parentSuite._retries;
|
|
77
|
+
if (inheritedTimeout === void 0 && parentSuite._timeout !== void 0)
|
|
78
|
+
inheritedTimeout = parentSuite._timeout;
|
|
79
|
+
}
|
|
80
|
+
test.retries = inheritedRetries ?? project.project.retries;
|
|
81
|
+
test.timeout = inheritedTimeout ?? project.project.timeout;
|
|
82
|
+
if (test.annotations.some((a) => a.type === "skip" || a.type === "fixme"))
|
|
83
|
+
test.expectedStatus = "skipped";
|
|
84
|
+
if (test._poolDigest)
|
|
85
|
+
test._workerHash = `${project.id}-${test._poolDigest}-0`;
|
|
86
|
+
});
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
function applyRepeatEachIndex(project, fileSuite, repeatEachIndex) {
|
|
90
|
+
fileSuite.forEachTest((test, suite) => {
|
|
91
|
+
if (repeatEachIndex) {
|
|
92
|
+
const [file, ...titles] = test.titlePath();
|
|
93
|
+
const testIdExpression = `[project=${project.id}]${(0, import_utils.toPosixPath)(file)}${titles.join("")} (repeat:${repeatEachIndex})`;
|
|
94
|
+
const testId = suite._fileId + "-" + (0, import_utils.calculateSha1)(testIdExpression).slice(0, 20);
|
|
95
|
+
test.id = testId;
|
|
96
|
+
test.repeatEachIndex = repeatEachIndex;
|
|
97
|
+
if (test._poolDigest)
|
|
98
|
+
test._workerHash = `${project.id}-${test._poolDigest}-${repeatEachIndex}`;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function filterOnly(suite) {
|
|
103
|
+
if (!suite._getOnlyItems().length)
|
|
104
|
+
return;
|
|
105
|
+
const suiteFilter = (suite2) => suite2._only;
|
|
106
|
+
const testFilter = (test) => test._only;
|
|
107
|
+
return filterSuiteWithOnlySemantics(suite, suiteFilter, testFilter);
|
|
108
|
+
}
|
|
109
|
+
function filterSuiteWithOnlySemantics(suite, suiteFilter, testFilter) {
|
|
110
|
+
const onlySuites = suite.suites.filter((child) => filterSuiteWithOnlySemantics(child, suiteFilter, testFilter) || suiteFilter(child));
|
|
111
|
+
const onlyTests = suite.tests.filter(testFilter);
|
|
112
|
+
const onlyEntries = /* @__PURE__ */ new Set([...onlySuites, ...onlyTests]);
|
|
113
|
+
if (onlyEntries.size) {
|
|
114
|
+
suite._entries = suite._entries.filter((e) => onlyEntries.has(e));
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
function filterByFocusedLine(suite, focusedTestFileLines) {
|
|
120
|
+
if (!focusedTestFileLines.length)
|
|
121
|
+
return;
|
|
122
|
+
const matchers = focusedTestFileLines.map(createFileMatcherFromFilter);
|
|
123
|
+
const testFileLineMatches = (testFileName, testLine, testColumn) => matchers.some((m) => m(testFileName, testLine, testColumn));
|
|
124
|
+
const suiteFilter = (suite2) => !!suite2.location && testFileLineMatches(suite2.location.file, suite2.location.line, suite2.location.column);
|
|
125
|
+
const testFilter = (test) => testFileLineMatches(test.location.file, test.location.line, test.location.column);
|
|
126
|
+
return filterSuite(suite, suiteFilter, testFilter);
|
|
127
|
+
}
|
|
128
|
+
function createFileMatcherFromFilter(filter) {
|
|
129
|
+
const fileMatcher = (0, import_util.createFileMatcher)(filter.re || filter.exact || "");
|
|
130
|
+
return (testFileName, testLine, testColumn) => fileMatcher(testFileName) && (filter.line === testLine || filter.line === null) && (filter.column === testColumn || filter.column === null);
|
|
131
|
+
}
|
|
132
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
133
|
+
0 && (module.exports = {
|
|
134
|
+
applyRepeatEachIndex,
|
|
135
|
+
bindFileSuiteToProject,
|
|
136
|
+
filterByFocusedLine,
|
|
137
|
+
filterOnly,
|
|
138
|
+
filterSuite,
|
|
139
|
+
filterTestsRemoveEmptySuites
|
|
140
|
+
});
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var test_exports = {};
|
|
20
|
+
__export(test_exports, {
|
|
21
|
+
Suite: () => Suite,
|
|
22
|
+
TestCase: () => TestCase
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(test_exports);
|
|
25
|
+
var import_testType = require("./testType");
|
|
26
|
+
var import_teleReceiver = require("../isomorphic/teleReceiver");
|
|
27
|
+
class Base {
|
|
28
|
+
constructor(title) {
|
|
29
|
+
this._only = false;
|
|
30
|
+
this._requireFile = "";
|
|
31
|
+
this.title = title;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class Suite extends Base {
|
|
35
|
+
constructor(title, type) {
|
|
36
|
+
super(title);
|
|
37
|
+
this._use = [];
|
|
38
|
+
this._entries = [];
|
|
39
|
+
this._hooks = [];
|
|
40
|
+
// Annotations known statically before running the test, e.g. `test.describe.skip()` or `test.describe({ annotation }, body)`.
|
|
41
|
+
this._staticAnnotations = [];
|
|
42
|
+
// Explicitly declared tags that are not a part of the title.
|
|
43
|
+
this._tags = [];
|
|
44
|
+
this._modifiers = [];
|
|
45
|
+
this._parallelMode = "none";
|
|
46
|
+
this._type = type;
|
|
47
|
+
}
|
|
48
|
+
get type() {
|
|
49
|
+
return this._type;
|
|
50
|
+
}
|
|
51
|
+
entries() {
|
|
52
|
+
return this._entries;
|
|
53
|
+
}
|
|
54
|
+
get suites() {
|
|
55
|
+
return this._entries.filter((entry) => entry instanceof Suite);
|
|
56
|
+
}
|
|
57
|
+
get tests() {
|
|
58
|
+
return this._entries.filter((entry) => entry instanceof TestCase);
|
|
59
|
+
}
|
|
60
|
+
_addTest(test) {
|
|
61
|
+
test.parent = this;
|
|
62
|
+
this._entries.push(test);
|
|
63
|
+
}
|
|
64
|
+
_addSuite(suite) {
|
|
65
|
+
suite.parent = this;
|
|
66
|
+
this._entries.push(suite);
|
|
67
|
+
}
|
|
68
|
+
_prependSuite(suite) {
|
|
69
|
+
suite.parent = this;
|
|
70
|
+
this._entries.unshift(suite);
|
|
71
|
+
}
|
|
72
|
+
allTests() {
|
|
73
|
+
const result = [];
|
|
74
|
+
const visit = (suite) => {
|
|
75
|
+
for (const entry of suite._entries) {
|
|
76
|
+
if (entry instanceof Suite)
|
|
77
|
+
visit(entry);
|
|
78
|
+
else
|
|
79
|
+
result.push(entry);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
visit(this);
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
_hasTests() {
|
|
86
|
+
let result = false;
|
|
87
|
+
const visit = (suite) => {
|
|
88
|
+
for (const entry of suite._entries) {
|
|
89
|
+
if (result)
|
|
90
|
+
return;
|
|
91
|
+
if (entry instanceof Suite)
|
|
92
|
+
visit(entry);
|
|
93
|
+
else
|
|
94
|
+
result = true;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
visit(this);
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
titlePath() {
|
|
101
|
+
const titlePath = this.parent ? this.parent.titlePath() : [];
|
|
102
|
+
if (this.title || this._type !== "describe")
|
|
103
|
+
titlePath.push(this.title);
|
|
104
|
+
return titlePath;
|
|
105
|
+
}
|
|
106
|
+
_collectGrepTitlePath(path) {
|
|
107
|
+
if (this.parent)
|
|
108
|
+
this.parent._collectGrepTitlePath(path);
|
|
109
|
+
if (this.title || this._type !== "describe")
|
|
110
|
+
path.push(this.title);
|
|
111
|
+
path.push(...this._tags);
|
|
112
|
+
}
|
|
113
|
+
_getOnlyItems() {
|
|
114
|
+
const items = [];
|
|
115
|
+
if (this._only)
|
|
116
|
+
items.push(this);
|
|
117
|
+
for (const suite of this.suites)
|
|
118
|
+
items.push(...suite._getOnlyItems());
|
|
119
|
+
items.push(...this.tests.filter((test) => test._only));
|
|
120
|
+
return items;
|
|
121
|
+
}
|
|
122
|
+
_deepClone() {
|
|
123
|
+
const suite = this._clone();
|
|
124
|
+
for (const entry of this._entries) {
|
|
125
|
+
if (entry instanceof Suite)
|
|
126
|
+
suite._addSuite(entry._deepClone());
|
|
127
|
+
else
|
|
128
|
+
suite._addTest(entry._clone());
|
|
129
|
+
}
|
|
130
|
+
return suite;
|
|
131
|
+
}
|
|
132
|
+
_deepSerialize() {
|
|
133
|
+
const suite = this._serialize();
|
|
134
|
+
suite.entries = [];
|
|
135
|
+
for (const entry of this._entries) {
|
|
136
|
+
if (entry instanceof Suite)
|
|
137
|
+
suite.entries.push(entry._deepSerialize());
|
|
138
|
+
else
|
|
139
|
+
suite.entries.push(entry._serialize());
|
|
140
|
+
}
|
|
141
|
+
return suite;
|
|
142
|
+
}
|
|
143
|
+
static _deepParse(data) {
|
|
144
|
+
const suite = Suite._parse(data);
|
|
145
|
+
for (const entry of data.entries) {
|
|
146
|
+
if (entry.kind === "suite")
|
|
147
|
+
suite._addSuite(Suite._deepParse(entry));
|
|
148
|
+
else
|
|
149
|
+
suite._addTest(TestCase._parse(entry));
|
|
150
|
+
}
|
|
151
|
+
return suite;
|
|
152
|
+
}
|
|
153
|
+
forEachTest(visitor) {
|
|
154
|
+
for (const entry of this._entries) {
|
|
155
|
+
if (entry instanceof Suite)
|
|
156
|
+
entry.forEachTest(visitor);
|
|
157
|
+
else
|
|
158
|
+
visitor(entry, this);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
_serialize() {
|
|
162
|
+
return {
|
|
163
|
+
kind: "suite",
|
|
164
|
+
title: this.title,
|
|
165
|
+
type: this._type,
|
|
166
|
+
location: this.location,
|
|
167
|
+
only: this._only,
|
|
168
|
+
requireFile: this._requireFile,
|
|
169
|
+
timeout: this._timeout,
|
|
170
|
+
retries: this._retries,
|
|
171
|
+
staticAnnotations: this._staticAnnotations.slice(),
|
|
172
|
+
tags: this._tags.slice(),
|
|
173
|
+
modifiers: this._modifiers.slice(),
|
|
174
|
+
parallelMode: this._parallelMode,
|
|
175
|
+
hooks: this._hooks.map((h) => ({ type: h.type, location: h.location, title: h.title })),
|
|
176
|
+
fileId: this._fileId
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
static _parse(data) {
|
|
180
|
+
const suite = new Suite(data.title, data.type);
|
|
181
|
+
suite.location = data.location;
|
|
182
|
+
suite._only = data.only;
|
|
183
|
+
suite._requireFile = data.requireFile;
|
|
184
|
+
suite._timeout = data.timeout;
|
|
185
|
+
suite._retries = data.retries;
|
|
186
|
+
suite._staticAnnotations = data.staticAnnotations;
|
|
187
|
+
suite._tags = data.tags;
|
|
188
|
+
suite._modifiers = data.modifiers;
|
|
189
|
+
suite._parallelMode = data.parallelMode;
|
|
190
|
+
suite._hooks = data.hooks.map((h) => ({ type: h.type, location: h.location, title: h.title, fn: () => {
|
|
191
|
+
} }));
|
|
192
|
+
suite._fileId = data.fileId;
|
|
193
|
+
return suite;
|
|
194
|
+
}
|
|
195
|
+
_clone() {
|
|
196
|
+
const data = this._serialize();
|
|
197
|
+
const suite = Suite._parse(data);
|
|
198
|
+
suite._use = this._use.slice();
|
|
199
|
+
suite._hooks = this._hooks.slice();
|
|
200
|
+
suite._fullProject = this._fullProject;
|
|
201
|
+
return suite;
|
|
202
|
+
}
|
|
203
|
+
project() {
|
|
204
|
+
return this._fullProject?.project || this.parent?.project();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
class TestCase extends Base {
|
|
208
|
+
constructor(title, fn, testType, location) {
|
|
209
|
+
super(title);
|
|
210
|
+
this.results = [];
|
|
211
|
+
this.type = "test";
|
|
212
|
+
this.expectedStatus = "passed";
|
|
213
|
+
this.timeout = 0;
|
|
214
|
+
this.annotations = [];
|
|
215
|
+
this.retries = 0;
|
|
216
|
+
this.repeatEachIndex = 0;
|
|
217
|
+
this.id = "";
|
|
218
|
+
this._poolDigest = "";
|
|
219
|
+
this._workerHash = "";
|
|
220
|
+
this._projectId = "";
|
|
221
|
+
// Explicitly declared tags that are not a part of the title.
|
|
222
|
+
this._tags = [];
|
|
223
|
+
this.fn = fn;
|
|
224
|
+
this._testType = testType;
|
|
225
|
+
this.location = location;
|
|
226
|
+
}
|
|
227
|
+
titlePath() {
|
|
228
|
+
const titlePath = this.parent ? this.parent.titlePath() : [];
|
|
229
|
+
titlePath.push(this.title);
|
|
230
|
+
return titlePath;
|
|
231
|
+
}
|
|
232
|
+
outcome() {
|
|
233
|
+
return (0, import_teleReceiver.computeTestCaseOutcome)(this);
|
|
234
|
+
}
|
|
235
|
+
ok() {
|
|
236
|
+
const status = this.outcome();
|
|
237
|
+
return status === "expected" || status === "flaky" || status === "skipped";
|
|
238
|
+
}
|
|
239
|
+
get tags() {
|
|
240
|
+
const titleTags = this._grepBaseTitlePath().join(" ").match(/@[\S]+/g) || [];
|
|
241
|
+
return [
|
|
242
|
+
...titleTags,
|
|
243
|
+
...this._tags
|
|
244
|
+
];
|
|
245
|
+
}
|
|
246
|
+
_serialize() {
|
|
247
|
+
return {
|
|
248
|
+
kind: "test",
|
|
249
|
+
id: this.id,
|
|
250
|
+
title: this.title,
|
|
251
|
+
retries: this.retries,
|
|
252
|
+
timeout: this.timeout,
|
|
253
|
+
expectedStatus: this.expectedStatus,
|
|
254
|
+
location: this.location,
|
|
255
|
+
only: this._only,
|
|
256
|
+
requireFile: this._requireFile,
|
|
257
|
+
poolDigest: this._poolDigest,
|
|
258
|
+
workerHash: this._workerHash,
|
|
259
|
+
annotations: this.annotations.slice(),
|
|
260
|
+
tags: this._tags.slice(),
|
|
261
|
+
projectId: this._projectId
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
static _parse(data) {
|
|
265
|
+
const test = new TestCase(data.title, () => {
|
|
266
|
+
}, import_testType.rootTestType, data.location);
|
|
267
|
+
test.id = data.id;
|
|
268
|
+
test.retries = data.retries;
|
|
269
|
+
test.timeout = data.timeout;
|
|
270
|
+
test.expectedStatus = data.expectedStatus;
|
|
271
|
+
test._only = data.only;
|
|
272
|
+
test._requireFile = data.requireFile;
|
|
273
|
+
test._poolDigest = data.poolDigest;
|
|
274
|
+
test._workerHash = data.workerHash;
|
|
275
|
+
test.annotations = data.annotations;
|
|
276
|
+
test._tags = data.tags;
|
|
277
|
+
test._projectId = data.projectId;
|
|
278
|
+
return test;
|
|
279
|
+
}
|
|
280
|
+
_clone() {
|
|
281
|
+
const data = this._serialize();
|
|
282
|
+
const test = TestCase._parse(data);
|
|
283
|
+
test._testType = this._testType;
|
|
284
|
+
test.fn = this.fn;
|
|
285
|
+
return test;
|
|
286
|
+
}
|
|
287
|
+
_appendTestResult() {
|
|
288
|
+
const result = {
|
|
289
|
+
retry: this.results.length,
|
|
290
|
+
parallelIndex: -1,
|
|
291
|
+
workerIndex: -1,
|
|
292
|
+
duration: 0,
|
|
293
|
+
startTime: /* @__PURE__ */ new Date(),
|
|
294
|
+
stdout: [],
|
|
295
|
+
stderr: [],
|
|
296
|
+
attachments: [],
|
|
297
|
+
status: "skipped",
|
|
298
|
+
steps: [],
|
|
299
|
+
errors: [],
|
|
300
|
+
annotations: []
|
|
301
|
+
};
|
|
302
|
+
this.results.push(result);
|
|
303
|
+
return result;
|
|
304
|
+
}
|
|
305
|
+
_grepBaseTitlePath() {
|
|
306
|
+
const path = [];
|
|
307
|
+
this.parent._collectGrepTitlePath(path);
|
|
308
|
+
path.push(this.title);
|
|
309
|
+
return path;
|
|
310
|
+
}
|
|
311
|
+
_grepTitleWithTags() {
|
|
312
|
+
const path = this._grepBaseTitlePath();
|
|
313
|
+
path.push(...this._tags);
|
|
314
|
+
return path.join(" ");
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
318
|
+
0 && (module.exports = {
|
|
319
|
+
Suite,
|
|
320
|
+
TestCase
|
|
321
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var testLoader_exports = {};
|
|
30
|
+
__export(testLoader_exports, {
|
|
31
|
+
defaultTimeout: () => defaultTimeout,
|
|
32
|
+
loadTestFile: () => loadTestFile
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(testLoader_exports);
|
|
35
|
+
var import_path = __toESM(require("path"));
|
|
36
|
+
var import_util = __toESM(require("util"));
|
|
37
|
+
var esmLoaderHost = __toESM(require("./esmLoaderHost"));
|
|
38
|
+
var import_globals = require("./globals");
|
|
39
|
+
var import_test = require("./test");
|
|
40
|
+
var import_compilationCache = require("../transform/compilationCache");
|
|
41
|
+
var import_transform = require("../transform/transform");
|
|
42
|
+
var import_util2 = require("../util");
|
|
43
|
+
const defaultTimeout = 3e4;
|
|
44
|
+
const cachedFileSuites = /* @__PURE__ */ new Map();
|
|
45
|
+
async function loadTestFile(file, config, testErrors) {
|
|
46
|
+
if (cachedFileSuites.has(file))
|
|
47
|
+
return cachedFileSuites.get(file);
|
|
48
|
+
const suite = new import_test.Suite(import_path.default.relative(config.config.rootDir, file) || import_path.default.basename(file), "file");
|
|
49
|
+
suite._requireFile = file;
|
|
50
|
+
suite.location = { file, line: 0, column: 0 };
|
|
51
|
+
suite._tags = [...config.config.tags];
|
|
52
|
+
(0, import_globals.setCurrentlyLoadingFileSuite)(suite);
|
|
53
|
+
if (!(0, import_globals.isWorkerProcess)()) {
|
|
54
|
+
(0, import_compilationCache.startCollectingFileDeps)();
|
|
55
|
+
await esmLoaderHost.startCollectingFileDeps();
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
await (0, import_transform.requireOrImport)(file);
|
|
59
|
+
cachedFileSuites.set(file, suite);
|
|
60
|
+
} catch (e) {
|
|
61
|
+
if (!testErrors)
|
|
62
|
+
throw e;
|
|
63
|
+
testErrors.push(serializeLoadError(file, e));
|
|
64
|
+
} finally {
|
|
65
|
+
(0, import_globals.setCurrentlyLoadingFileSuite)(void 0);
|
|
66
|
+
if (!(0, import_globals.isWorkerProcess)()) {
|
|
67
|
+
(0, import_compilationCache.stopCollectingFileDeps)(file);
|
|
68
|
+
await esmLoaderHost.stopCollectingFileDeps(file);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
{
|
|
72
|
+
const files = /* @__PURE__ */ new Set();
|
|
73
|
+
suite.allTests().map((t) => files.add(t.location.file));
|
|
74
|
+
if (files.size === 1) {
|
|
75
|
+
const mappedFile = files.values().next().value;
|
|
76
|
+
if (suite.location.file !== mappedFile) {
|
|
77
|
+
if (import_path.default.extname(mappedFile) !== import_path.default.extname(suite.location.file))
|
|
78
|
+
suite.location.file = mappedFile;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return suite;
|
|
83
|
+
}
|
|
84
|
+
function serializeLoadError(file, error) {
|
|
85
|
+
if (error instanceof Error) {
|
|
86
|
+
const result = (0, import_util2.filterStackTrace)(error);
|
|
87
|
+
const loc = error.loc;
|
|
88
|
+
result.location = loc ? {
|
|
89
|
+
file,
|
|
90
|
+
line: loc.line || 0,
|
|
91
|
+
column: loc.column || 0
|
|
92
|
+
} : void 0;
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
return { value: import_util.default.inspect(error) };
|
|
96
|
+
}
|
|
97
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
98
|
+
0 && (module.exports = {
|
|
99
|
+
defaultTimeout,
|
|
100
|
+
loadTestFile
|
|
101
|
+
});
|