From 6915c979a20e8a7ac80ff41493ef8203d6b2e616 Mon Sep 17 00:00:00 2001 From: Alex Lewin <43247027+alexlwn123@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:03:04 -0400 Subject: [PATCH] Feat: adds testing fixtures for setup/teardown (#51) * feat: disable screenshots on failed tests * feat: add worker unit tests --- docs/examples/vite-react.md | 1 + examples/bare-js/index.html | 3 + .../src/services/FederationService.test.ts | 128 ++++++------ .../src/services/LightningService.test.ts | 190 ++++++++---------- packages/core-web/src/test/TestingService.ts | 6 +- packages/core-web/src/test/setupTests.ts | 43 ++++ packages/core-web/src/worker/worker.js | 3 + packages/core-web/src/worker/worker.test.ts | 93 +++++++++ vitest.workspace.ts | 1 + 9 files changed, 295 insertions(+), 173 deletions(-) create mode 100644 packages/core-web/src/test/setupTests.ts create mode 100644 packages/core-web/src/worker/worker.test.ts diff --git a/docs/examples/vite-react.md b/docs/examples/vite-react.md index 2f3ab96..b755d98 100644 --- a/docs/examples/vite-react.md +++ b/docs/examples/vite-react.md @@ -15,6 +15,7 @@ You might need to disable your adblocker or Brave Shields to see the preview. ::: + [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/fedimint/fedimint-web-sdk/tree/main/examples/vite-core) ## Running the Example Locally diff --git a/examples/bare-js/index.html b/examples/bare-js/index.html index e18a6b4..60b0dbb 100644 --- a/examples/bare-js/index.html +++ b/examples/bare-js/index.html @@ -8,6 +8,7 @@ +

Fedimint Web SDK Bare html/js example

@@ -18,7 +19,9 @@

Fedimint Web SDK Bare html/js example

Faucet Link: https://faucet.mutinynet.com/

+