From 356f42d2098b8c4e7e23d435e7a193901b09ee75 Mon Sep 17 00:00:00 2001 From: padreug Date: Sun, 10 Aug 2025 18:07:16 +0200 Subject: [PATCH] feat: Add HTML test page for formatting functions - Introduce a new HTML file that tests various formatting utility functions, including number, Satoshi, millisatoshi, currency, event price, and wallet balance formatting. - Implement a structured layout with sections for each test type and a summary of test results. - Include JavaScript to run tests on page load, displaying success and error results for each formatting function. - Update import paths in the existing TypeScript test file to ensure compatibility with the new structure. --- src/lib/utils/formatting.test.ts | 2 +- test-formatting.html | 298 +++++++++++++++++++++++++++++++ 2 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 test-formatting.html diff --git a/src/lib/utils/formatting.test.ts b/src/lib/utils/formatting.test.ts index bc9a849..7f96d15 100644 --- a/src/lib/utils/formatting.test.ts +++ b/src/lib/utils/formatting.test.ts @@ -10,7 +10,7 @@ import { formatCurrency, formatEventPrice, formatWalletBalance -} from './formatting' +} from './formatting.js' // Test data const testNumbers = [ diff --git a/test-formatting.html b/test-formatting.html new file mode 100644 index 0000000..72d6829 --- /dev/null +++ b/test-formatting.html @@ -0,0 +1,298 @@ + + + + + + Formatting Functions Test + + + +

Formatting Functions Test

+

This page tests the formatting utility functions for thousand separators and currency formatting.

+ +
+

Test Summary

+
+
+ +
+

Number Formatting Tests

+
+
+ +
+

Satoshi Formatting Tests

+
+
+ +
+

Millisatoshi Formatting Tests

+
+
+ +
+

Currency Formatting Tests

+
+
+ +
+

Event Price Formatting Tests

+
+
+ +
+

Wallet Balance Formatting Tests

+
+
+ + + +