This pull request introduces changes to the JavaScript SDK, primarily focusing on the testing environment and dependencies. The most significant changes include the addition of new dependencies, updates to existing dependencies, and the introduction of a new testing environment using Vitest and Playwright for browser-based testing.
New dependencies and updates:
sdk/js/packages/client/package.json: Added @vitest/browser and playwright to the devDependencies, and a postinstall script to install Chromium using Playwright. [1][2]
Testing environment:
sdk/js/packages/client/vitest.workspace.ts: Defined a new workspace for Vitest, specifying separate test environments for node and browser-based tests. The browser tests use Playwright with Chromium in headless mode.
This pull request introduces changes to the JavaScript SDK, primarily focusing on the testing environment and dependencies. The most significant changes include the addition of new dependencies, updates to existing dependencies, and the introduction of a new testing environment using Vitest and Playwright for browser-based testing.
New dependencies and updates:
sdk/js/packages/client/package.json
: Added@vitest/browser
andplaywright
to thedevDependencies
, and apostinstall
script to install Chromium using Playwright. [1] [2]Testing environment:
sdk/js/packages/client/vitest.workspace.ts
: Defined a new workspace for Vitest, specifying separate test environments for node and browser-based tests. The browser tests use Playwright with Chromium in headless mode.sdk/js/packages/client/test/util/url.browser.test.ts
: Added new tests for thetoAbsoluteUrl
function in a browser environment.Other changes:
.devcontainer/Dockerfile
: Added new libraries to the Dockerfile for the development container.sdk/js/packages/client/eslint.config.js
,sdk/js/packages/client/src/util/url-browser.mts
: Format updates.