diff --git a/package.json b/package.json index c0ecb94cb7..9aa8012419 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "start-dev": "vite --mode dev --host", "start-stg": "vite --mode stg --host", "start-prod": "vite --mode production --host", - "test": "vitest --mode production", "test-e2e": "synpress run -cf cypress.config.ts", "test-schedule": "synpress run -cf cypress.config.ts" }, @@ -189,16 +188,13 @@ "eslint-plugin-react": "^7.31.10", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-unused-imports": "^2.0.0", - "jsdom": "^22.1.0", "prettier": "^2.7.1", "prom-client": "^14.2.0", "ts-node": "^10.9.1", "typescript": "4.8.4", "vite": "^4.3.9", "vite-plugin-checker": "^0.5.6", - "vite-plugin-svgr": "^2.4.0", - "vite-tsconfig-paths": "^4.0.8", - "vitest": "^0.34.4" + "vite-plugin-svgr": "^2.4.0" }, "resolutions": { "@kyberswap/ks-sdk-core": "1.0.11", @@ -208,4 +204,4 @@ "@lingui/core": "3.14.0", "@lingui/conf": "3.16.0" } -} +} \ No newline at end of file diff --git a/src/utils/tests/numbers.test.ts b/src/utils/tests/numbers.test.ts deleted file mode 100644 index ae28a33355..0000000000 --- a/src/utils/tests/numbers.test.ts +++ /dev/null @@ -1,3665 +0,0 @@ -/* eslint-disable @typescript-eslint/no-loss-of-precision */ -import { Currency, CurrencyAmount, Fraction, Percent, Price, Token } from '@kyberswap/ks-sdk-core' -import { afterAll, beforeAll, describe, expect, test, vi } from 'vitest' - -import { formatDisplayNumber } from '../numbers' - -describe('formatDisplayNumber tests', () => { - beforeAll(() => { - vi.mock('uuid', async importOriginal => { - const mod = (await importOriginal()) as any - return { - ...mod, - v4: () => '', - } - }) - }) - afterAll(() => { - vi.clearAllMocks() - }) - describe('decimal', () => { - describe('number', () => { - describe('large numbers', () => { - describe('2 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { significantDigits: 2 })).toBe('1') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { significantDigits: 2 })).toBe('12') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { significantDigits: 2 })).toBe('120') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { significantDigits: 2 })).toBe('1.2K') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { significantDigits: 2 })).toBe('12K') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { significantDigits: 2 })).toBe('120K') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { significantDigits: 2 })).toBe('1.2M') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { significantDigits: 2 })).toBe('12M') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { significantDigits: 2 })).toBe('120M') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { significantDigits: 2 })).toBe('120,000T') - }) - }) - describe('6 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { significantDigits: 6 })).toBe('1') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { significantDigits: 6 })).toBe('12') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { significantDigits: 6 })).toBe('123') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { significantDigits: 6 })).toBe('1,234') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { significantDigits: 6 })).toBe('12,345') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { significantDigits: 6 })).toBe('123,456') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { significantDigits: 6 })).toBe('1.23457M') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { significantDigits: 6 })).toBe('12.3457M') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { significantDigits: 6 })).toBe('123.457M') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { significantDigits: 6 })).toBe('123,457T') - }) - }) - describe('18 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { significantDigits: 18 })).toBe('1') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { significantDigits: 18 })).toBe('12') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { significantDigits: 18 })).toBe('123') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { significantDigits: 18 })).toBe('1,234') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { significantDigits: 18 })).toBe('12,345') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { significantDigits: 18 })).toBe('123,456') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { significantDigits: 18 })).toBe('1,234,567') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { significantDigits: 18 })).toBe('12,345,678') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { significantDigits: 18 })).toBe('123,456,789') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { significantDigits: 18 })).toBe('123,456,789,123,456,780') - }) - test('format number 1234567891234567891 correctly', () => { - expect(formatDisplayNumber(1234567891234567891, { significantDigits: 18 })).toBe('1,234,567.891234568T') - }) - }) - }) - describe('small numbers', () => { - describe('2 significantDigits', () => { - test('format number 123456.123456789 correctly', () => { - expect(formatDisplayNumber(123456.123456789, { significantDigits: 2 })).toBe('120K') - }) - test('format number 12345.123456789 correctly', () => { - expect(formatDisplayNumber(12345.123456789, { significantDigits: 2 })).toBe('12K') - }) - test('format number 1234.123456789 correctly', () => { - expect(formatDisplayNumber(1234.123456789, { significantDigits: 2 })).toBe('1.2K') - }) - test('format number 123.123456789 correctly', () => { - expect(formatDisplayNumber(123.123456789, { significantDigits: 2 })).toBe('120') - }) - test('format number 12.123456789 correctly', () => { - expect(formatDisplayNumber(12.123456789, { significantDigits: 2 })).toBe('12') - }) - test('format number 1.123456789 correctly', () => { - expect(formatDisplayNumber(1.123456789, { significantDigits: 2 })).toBe('1.1') - }) - test('format number 0.123456789 correctly', () => { - expect(formatDisplayNumber(0.123456789, { significantDigits: 2 })).toBe('0.12') - }) - test('format number 0.0123456789 correctly', () => { - expect(formatDisplayNumber(0.0123456789, { significantDigits: 2 })).toBe('0.012') - }) - test('format number 0.00123456789 correctly', () => { - expect(formatDisplayNumber(0.00123456789, { significantDigits: 2 })).toBe('0.0012') - }) - test('format number 0.000123456789 correctly', () => { - expect(formatDisplayNumber(0.000123456789, { significantDigits: 2 })).toBe('0.0₃12') - }) - test('format number 0.0000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000123456789, { significantDigits: 2 })).toBe('0.0₄12') - }) - test('format number 0.00000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000123456789, { significantDigits: 2 })).toBe('0.0₅12') - }) - test('format number 0.000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000123456789, { significantDigits: 2 })).toBe('0.0₆12') - }) - test('format number 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000123456789, { significantDigits: 2 })).toBe('0.0₇12') - }) - test('format number 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000123456789, { significantDigits: 2 })).toBe('0.0₈12') - }) - test('format number 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000123456789, { significantDigits: 2 })).toBe('0.0₉12') - }) - test('format number 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000000123456789, { significantDigits: 2 })).toBe('0.0₁₀12') - }) - test('format number 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000123456789, { significantDigits: 2 })).toBe('0.0₁₁12') - }) - test('format number 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000000123456789, { significantDigits: 2 })).toBe('0.0₁₂12') - }) - test('format number 0.00000000000000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000000000000000123456789, { significantDigits: 2 })).toBe('0.0₂₃12') - }) - }) - describe('6 significantDigits', () => { - test('format number 12345678.123456789 correctly', () => { - expect(formatDisplayNumber(12345678.123456789, { significantDigits: 6 })).toBe('12.3457M') - }) - test('format number 1234567.123456789 correctly', () => { - expect(formatDisplayNumber(1234567.123456789, { significantDigits: 6 })).toBe('1.23457M') - }) - test('format number 12345.123456789 correctly', () => { - expect(formatDisplayNumber(12345.123456789, { significantDigits: 6 })).toBe('12,345.1') - }) - test('format number 1234.123456789 correctly', () => { - expect(formatDisplayNumber(1234.123456789, { significantDigits: 6 })).toBe('1,234.12') - }) - test('format number 123.123456789 correctly', () => { - expect(formatDisplayNumber(123.123456789, { significantDigits: 6 })).toBe('123.123') - }) - test('format number 12.123456789 correctly', () => { - expect(formatDisplayNumber(12.123456789, { significantDigits: 6 })).toBe('12.1235') - }) - test('format number 1.123456789 correctly', () => { - expect(formatDisplayNumber(1.123456789, { significantDigits: 6 })).toBe('1.12346') - }) - test('format number 0.123456789 correctly', () => { - expect(formatDisplayNumber(0.123456789, { significantDigits: 6 })).toBe('0.123456') - }) - test('format number 0.0123456789 correctly', () => { - expect(formatDisplayNumber(0.0123456789, { significantDigits: 6 })).toBe('0.0123456') - }) - test('format number 0.00123456789 correctly', () => { - expect(formatDisplayNumber(0.00123456789, { significantDigits: 6 })).toBe('0.00123456') - }) - test('format number 0.000123456789 correctly', () => { - expect(formatDisplayNumber(0.000123456789, { significantDigits: 6 })).toBe('0.0₃123456') - }) - test('format number 0.0000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000123456789, { significantDigits: 6 })).toBe('0.0₄123456') - }) - test('format number 0.00000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000123456789, { significantDigits: 6 })).toBe('0.0₅123456') - }) - test('format number 0.000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000123456789, { significantDigits: 6 })).toBe('0.0₆123456') - }) - test('format number 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000123456789, { significantDigits: 6 })).toBe('0.0₇123456') - }) - test('format number 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000123456789, { significantDigits: 6 })).toBe('0.0₈123456') - }) - test('format number 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000123456789, { significantDigits: 6 })).toBe('0.0₉123456') - }) - test('format number 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000000123456789, { significantDigits: 6 })).toBe('0.0₁₀123456') - }) - test('format number 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000123456789, { significantDigits: 6 })).toBe('0.0₁₁123456') - }) - test('format number 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000000123456789, { significantDigits: 6 })).toBe('0.0₁₂123456') - }) - test('format number 0.00000000000000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000000000000000123456789, { significantDigits: 6 })).toBe( - '0.0₂₃123456', - ) - }) - }) - describe('18 significantDigits', () => { - test('format number 123456.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456.123456789123456789123456789, { significantDigits: 18 })).toBe( - '123,456.12345678912', - ) - }) - test('format number 12345.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(12345.123456789123456789123456789, { significantDigits: 18 })).toBe( - '12,345.123456789124', - ) - }) - test('format number 1234.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(1234.123456789123456789123456789, { significantDigits: 18 })).toBe( - '1,234.1234567891236', - ) - }) - test('format number 123.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(123.123456789123456789123456789, { significantDigits: 18 })).toBe( - '123.12345678912345', - ) - }) - test('format number 12.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(12.123456789123456789123456789, { significantDigits: 18 })).toBe( - '12.123456789123457', - ) - }) - test('format number 1.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(1.123456789123456789123456789, { significantDigits: 18 })).toBe( - '1.1234567891234568', - ) - }) - test('format number 0.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.12345678912345678', - ) - }) - test('format number 0.0123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.0123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.012345678912345679', - ) - }) - test('format number 0.00123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.00123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.001234567891234568', - ) - }) - test('format number 0.000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₃1234567891234568', - ) - }) - test('format number 0.0000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.0000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₄12345678912345678', - ) - }) - test('format number 0.00000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.00000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₅12345678912345679', - ) - }) - test('format number 0.000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.000000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₆1234567891234568', - ) - }) - test('format number 0.0000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₇1234567891234568', - ) - }) - test('format number 0.00000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₈12345678912345678', - ) - }) - test('format number 0.000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₉1234567891234568', - ) - }) - test('format number 0.0000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₁₀12345678912345678', - ) - }) - test('format number 0.00000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₁₁12345678912345678', - ) - }) - test('format number 0.000000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000000123456789123456789123456789, { significantDigits: 18 })).toBe( - '0.0₁₂12345678912345678', - ) - }) - test('format number 0.00000000000000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000000000000000123456789123456789123456789, { significantDigits: 18 }), - ).toBe('0.0₂₃12345678912345678') - }) - }) - }) - describe('negative numbers', () => { - test('format number -123456789123456789.123456789 correctly', () => { - expect(formatDisplayNumber(-123456789123456789.123456789, { significantDigits: 6 })).toBe('--') - }) - test('format number -123456789123456789.123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789.123456789, { significantDigits: 6, allowNegative: true }), - ).toBe('-123,457T') - }) - test('format number -1234567.123456789 correctly', () => { - expect(formatDisplayNumber(-1234567.123456789, { significantDigits: 6, allowNegative: true })).toBe( - '-1.23457M', - ) - }) - test('format number -123456.123456789 correctly', () => { - expect(formatDisplayNumber(-123456.123456789, { significantDigits: 6, allowNegative: true })).toBe('-123,456') - }) - test('format number -12345.123456789 correctly', () => { - expect(formatDisplayNumber(-12345.123456789, { significantDigits: 6, allowNegative: true })).toBe('-12,345.1') - }) - test('format number -1234.123456789 correctly', () => { - expect(formatDisplayNumber(-1234.123456789, { significantDigits: 6, allowNegative: true })).toBe('-1,234.12') - }) - test('format number -123.123456789 correctly', () => { - expect(formatDisplayNumber(-123.123456789, { significantDigits: 6, allowNegative: true })).toBe('-123.123') - }) - test('format number -12.123456789 correctly', () => { - expect(formatDisplayNumber(-12.123456789, { significantDigits: 6, allowNegative: true })).toBe('-12.1235') - }) - test('format number -1.123456789 correctly', () => { - expect(formatDisplayNumber(-1.123456789, { significantDigits: 6, allowNegative: true })).toBe('-1.12346') - }) - test('format number -0.123456789 correctly', () => { - expect(formatDisplayNumber(-0.123456789, { significantDigits: 6, allowNegative: true })).toBe('-0.123456') - }) - test('format number -0.0123456789 correctly', () => { - expect(formatDisplayNumber(-0.0123456789, { significantDigits: 6, allowNegative: true })).toBe('-0.0123456') - }) - test('format number -0.00123456789 correctly', () => { - expect(formatDisplayNumber(-0.00123456789, { significantDigits: 6, allowNegative: true })).toBe('-0.00123456') - }) - test('format number -0.000123456789 correctly', () => { - expect(formatDisplayNumber(-0.000123456789, { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₃123456', - ) - }) - test('format number -0.0000123456789 correctly', () => { - expect(formatDisplayNumber(-0.0000123456789, { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₄123456', - ) - }) - test('format number -0.00000123456789 correctly', () => { - expect(formatDisplayNumber(-0.00000123456789, { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₅123456', - ) - }) - test('format number -0.000000123456789 correctly', () => { - expect(formatDisplayNumber(-0.000000123456789, { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₆123456', - ) - }) - }) - }) - describe('string', () => { - describe('large strings', () => { - describe('2 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { significantDigits: 2 })).toBe('1') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { significantDigits: 2 })).toBe('12') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { significantDigits: 2 })).toBe('120') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { significantDigits: 2 })).toBe('1.2K') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { significantDigits: 2 })).toBe('12K') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { significantDigits: 2 })).toBe('120K') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { significantDigits: 2 })).toBe('1.2M') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { significantDigits: 2 })).toBe('12M') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { significantDigits: 2 })).toBe('120M') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { significantDigits: 2 })).toBe('120,000T') - }) - }) - describe('6 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { significantDigits: 6 })).toBe('1') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { significantDigits: 6 })).toBe('12') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { significantDigits: 6 })).toBe('123') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { significantDigits: 6 })).toBe('1,234') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { significantDigits: 6 })).toBe('12,345') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { significantDigits: 6 })).toBe('123,456') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { significantDigits: 6 })).toBe('1.23457M') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { significantDigits: 6 })).toBe('12.3457M') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { significantDigits: 6 })).toBe('123.457M') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { significantDigits: 6 })).toBe('123,457T') - }) - }) - describe('18 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { significantDigits: 18 })).toBe('1') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { significantDigits: 18 })).toBe('12') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { significantDigits: 18 })).toBe('123') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { significantDigits: 18 })).toBe('1,234') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { significantDigits: 18 })).toBe('12,345') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { significantDigits: 18 })).toBe('123,456') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { significantDigits: 18 })).toBe('1,234,567') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { significantDigits: 18 })).toBe('12,345,678') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { significantDigits: 18 })).toBe('123,456,789') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { significantDigits: 18 })).toBe('123,456,789,123,456,780') - }) - test('format string 1234567891234567891 correctly', () => { - expect(formatDisplayNumber('1234567891234567891', { significantDigits: 18 })).toBe('1,234,567.891234568T') - }) - }) - }) - describe('small strings', () => { - describe('2 significantDigits', () => { - test('format string 123456.123456789 correctly', () => { - expect(formatDisplayNumber('123456.123456789', { significantDigits: 2 })).toBe('120K') - }) - test('format string 12345.123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789', { significantDigits: 2 })).toBe('12K') - }) - test('format string 1234.123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789', { significantDigits: 2 })).toBe('1.2K') - }) - test('format string 123.123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789', { significantDigits: 2 })).toBe('120') - }) - test('format string 12.123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789', { significantDigits: 2 })).toBe('12') - }) - test('format string 1.123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789', { significantDigits: 2 })).toBe('1.1') - }) - test('format string 0.123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789', { significantDigits: 2 })).toBe('0.12') - }) - test('format string 0.0123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789', { significantDigits: 2 })).toBe('0.012') - }) - test('format string 0.00123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789', { significantDigits: 2 })).toBe('0.0012') - }) - test('format string 0.000123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789', { significantDigits: 2 })).toBe('0.0₃12') - }) - test('format string 0.0000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789', { significantDigits: 2 })).toBe('0.0₄12') - }) - test('format string 0.00000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789', { significantDigits: 2 })).toBe('0.0₅12') - }) - test('format string 0.000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789', { significantDigits: 2 })).toBe('0.0₆12') - }) - test('format string 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789', { significantDigits: 2 })).toBe('0.0₇12') - }) - test('format string 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789', { significantDigits: 2 })).toBe('0.0₈12') - }) - test('format string 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789', { significantDigits: 2 })).toBe('0.0₉12') - }) - test('format string 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789', { significantDigits: 2 })).toBe('0.0₁₀12') - }) - test('format string 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789', { significantDigits: 2 })).toBe('0.0₁₁12') - }) - test('format string 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789', { significantDigits: 2 })).toBe('0.0₁₂12') - }) - test('format string 0.00000000000000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000000000000000123456789', { significantDigits: 2 })).toBe('0.0₂₃12') - }) - }) - describe('6 significantDigits', () => { - test('format string 12345678.123456789 correctly', () => { - expect(formatDisplayNumber('12345678.123456789', { significantDigits: 6 })).toBe('12.3457M') - }) - test('format string 1234567.123456789 correctly', () => { - expect(formatDisplayNumber('1234567.123456789', { significantDigits: 6 })).toBe('1.23457M') - }) - test('format string 12345.123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789', { significantDigits: 6 })).toBe('12,345.1') - }) - test('format string 1234.123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789', { significantDigits: 6 })).toBe('1,234.12') - }) - test('format string 123.123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789', { significantDigits: 6 })).toBe('123.123') - }) - test('format string 12.123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789', { significantDigits: 6 })).toBe('12.1235') - }) - test('format string 1.123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789', { significantDigits: 6 })).toBe('1.12346') - }) - test('format string 0.123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789', { significantDigits: 6 })).toBe('0.123456') - }) - test('format string 0.0123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789', { significantDigits: 6 })).toBe('0.0123456') - }) - test('format string 0.00123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789', { significantDigits: 6 })).toBe('0.00123456') - }) - test('format string 0.000123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789', { significantDigits: 6 })).toBe('0.0₃123456') - }) - test('format string 0.0000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789', { significantDigits: 6 })).toBe('0.0₄123456') - }) - test('format string 0.00000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789', { significantDigits: 6 })).toBe('0.0₅123456') - }) - test('format string 0.000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789', { significantDigits: 6 })).toBe('0.0₆123456') - }) - test('format string 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789', { significantDigits: 6 })).toBe('0.0₇123456') - }) - test('format string 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789', { significantDigits: 6 })).toBe('0.0₈123456') - }) - test('format string 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789', { significantDigits: 6 })).toBe('0.0₉123456') - }) - test('format string 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789', { significantDigits: 6 })).toBe('0.0₁₀123456') - }) - test('format string 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789', { significantDigits: 6 })).toBe('0.0₁₁123456') - }) - test('format string 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789', { significantDigits: 6 })).toBe('0.0₁₂123456') - }) - test('format string 0.00000000000000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000000000000000123456789', { significantDigits: 6 })).toBe( - '0.0₂₃123456', - ) - }) - }) - describe('18 significantDigits', () => { - test('format string 123456.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456.123456789123456789123456789', { significantDigits: 18 })).toBe( - '123,456.12345678912', - ) - }) - test('format string 12345.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789123456789123456789', { significantDigits: 18 })).toBe( - '12,345.123456789124', - ) - }) - test('format string 1234.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789123456789123456789', { significantDigits: 18 })).toBe( - '1,234.1234567891236', - ) - }) - test('format string 123.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789123456789123456789', { significantDigits: 18 })).toBe( - '123.12345678912345', - ) - }) - test('format string 12.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789123456789123456789', { significantDigits: 18 })).toBe( - '12.123456789123457', - ) - }) - test('format string 1.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789123456789123456789', { significantDigits: 18 })).toBe( - '1.1234567891234568', - ) - }) - test('format string 0.123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.123456789123456789', - ) - }) - test('format string 0.0123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0123456789123456789', - ) - }) - test('format string 0.00123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.00123456789123456789', - ) - }) - test('format string 0.000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₃123456789123456789', - ) - }) - test('format string 0.0000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₄123456789123456789', - ) - }) - test('format string 0.00000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₅123456789123456789', - ) - }) - test('format string 0.000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₆123456789123456789', - ) - }) - test('format string 0.0000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₇123456789123456789', - ) - }) - test('format string 0.00000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₈123456789123456789', - ) - }) - test('format string 0.000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₉123456789123456789', - ) - }) - test('format string 0.0000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₁₀123456789123456789', - ) - }) - test('format string 0.00000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₁₁123456789123456789', - ) - }) - test('format string 0.000000000000123456789123456789123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789123456789123456789', { significantDigits: 18 })).toBe( - '0.0₁₂123456789123456789', - ) - }) - test('format string 0.00000000000000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000000000000000123456789123456789123456789', { significantDigits: 18 }), - ).toBe('0.0₂₃123456789123456789') - }) - }) - describe('4 fractionDigits', () => { - test('format string 12345678.123456789 correctly', () => { - expect(formatDisplayNumber('12345678.123456789', { fractionDigits: 4 })).toBe('12.3457M') - }) - test('format string 1234567.123456789 correctly', () => { - expect(formatDisplayNumber('1234567.123456789', { fractionDigits: 4 })).toBe('1.2346M') - }) - test('format string 12345.123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789', { fractionDigits: 4 })).toBe('12.3451K') - }) - test('format string 1234.123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789', { fractionDigits: 4 })).toBe('1,234.1235') - }) - test('format string 123.123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789', { fractionDigits: 4 })).toBe('123.1235') - }) - test('format string 12.123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789', { fractionDigits: 4 })).toBe('12.1235') - }) - test('format string 1.123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789', { fractionDigits: 4 })).toBe('1.1235') - }) - test('format string 0.123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789', { fractionDigits: 4 })).toBe('0.1234') - }) - test('format string 0.0123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789', { fractionDigits: 4 })).toBe('0.01234') - }) - test('format string 0.00123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789', { fractionDigits: 4 })).toBe('0.001234') - }) - test('format string 0.000123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789', { fractionDigits: 4 })).toBe('0.0₃1234') - }) - test('format string 0.0000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789', { fractionDigits: 4 })).toBe('0.0₄1234') - }) - test('format string 0.00000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789', { fractionDigits: 4 })).toBe('0.0₅1234') - }) - test('format string 0.000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789', { fractionDigits: 4 })).toBe('0.0₆1234') - }) - test('format string 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789', { fractionDigits: 4 })).toBe('0.0₇1234') - }) - test('format string 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789', { fractionDigits: 4 })).toBe('0.0₈1234') - }) - test('format string 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789', { fractionDigits: 4 })).toBe('0.0₉1234') - }) - test('format string 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789', { fractionDigits: 4 })).toBe('0.0₁₀1234') - }) - test('format string 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789', { fractionDigits: 4 })).toBe('0.0₁₁1234') - }) - test('format string 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789', { fractionDigits: 4 })).toBe('0.0₁₂1234') - }) - test('format string 0.00000000000000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000000000000000123456789', { fractionDigits: 4 })).toBe('0.0₂₃1234') - }) - }) - }) - describe('negative strings', () => { - test('format string -123456789123456789.123456789 correctly', () => { - expect(formatDisplayNumber('-123456789123456789.123456789', { significantDigits: 6 })).toBe('--') - }) - test('format string -123456789123456789.123456789 correctly', () => { - expect( - formatDisplayNumber('-123456789123456789.123456789', { significantDigits: 6, allowNegative: true }), - ).toBe('-123,457T') - }) - test('format string -1234567.123456789 correctly', () => { - expect(formatDisplayNumber('-1234567.123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-1.23457M', - ) - }) - test('format string -123456.123456789 correctly', () => { - expect(formatDisplayNumber('-123456.123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-123,456', - ) - }) - test('format string -12345.123456789 correctly', () => { - expect(formatDisplayNumber('-12345.123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-12,345.1', - ) - }) - test('format string -1234.123456789 correctly', () => { - expect(formatDisplayNumber('-1234.123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-1,234.12', - ) - }) - test('format string -123.123456789 correctly', () => { - expect(formatDisplayNumber('-123.123456789', { significantDigits: 6, allowNegative: true })).toBe('-123.123') - }) - test('format string -12.123456789 correctly', () => { - expect(formatDisplayNumber('-12.123456789', { significantDigits: 6, allowNegative: true })).toBe('-12.1235') - }) - test('format string -1.123456789 correctly', () => { - expect(formatDisplayNumber('-1.123456789', { significantDigits: 6, allowNegative: true })).toBe('-1.12346') - }) - test('format string -0.123456789 correctly', () => { - expect(formatDisplayNumber('-0.123456789', { significantDigits: 6, allowNegative: true })).toBe('-0.123456') - }) - test('format string -0.0123456789 correctly', () => { - expect(formatDisplayNumber('-0.0123456789', { significantDigits: 6, allowNegative: true })).toBe('-0.0123456') - }) - test('format string -0.00123456789 correctly', () => { - expect(formatDisplayNumber('-0.00123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-0.00123456', - ) - }) - test('format string -0.000123456789 correctly', () => { - expect(formatDisplayNumber('-0.000123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₃123456', - ) - }) - test('format string -0.0000123456789 correctly', () => { - expect(formatDisplayNumber('-0.0000123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₄123456', - ) - }) - test('format string -0.00000123456789 correctly', () => { - expect(formatDisplayNumber('-0.00000123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₅123456', - ) - }) - test('format string -0.000000123456789 correctly', () => { - expect(formatDisplayNumber('-0.000000123456789', { significantDigits: 6, allowNegative: true })).toBe( - '-0.0₆123456', - ) - }) - }) - }) - describe('bigint', () => { - describe('positive bigint', () => { - describe('2 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { significantDigits: 2 })).toBe('0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { significantDigits: 2 })).toBe('1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { significantDigits: 2 })).toBe('12') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { significantDigits: 2 })).toBe('120') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { significantDigits: 2 })).toBe('1.2K') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { significantDigits: 2 })).toBe('12K') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { significantDigits: 2 })).toBe('120K') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { significantDigits: 2 })).toBe('1.2M') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { significantDigits: 2 })).toBe('12M') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { significantDigits: 2 })).toBe('120M') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { significantDigits: 2 })).toBe('1.2B') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { significantDigits: 2 })).toBe('120,000T') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { significantDigits: 2 })).toBe( - '120,000,000,000,000T', - ) - }) - }) - describe('6 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { significantDigits: 6 })).toBe('0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { significantDigits: 6 })).toBe('1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { significantDigits: 6 })).toBe('12') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { significantDigits: 6 })).toBe('123') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { significantDigits: 6 })).toBe('1,234') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { significantDigits: 6 })).toBe('12,345') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { significantDigits: 6 })).toBe('123,456') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { significantDigits: 6 })).toBe('1.23457M') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { significantDigits: 6 })).toBe('12.3457M') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { significantDigits: 6 })).toBe('123.457M') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { significantDigits: 6 })).toBe('1.23457B') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { significantDigits: 6 })).toBe('123,457T') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { significantDigits: 6 })).toBe( - '123,457,000,000,000T', - ) - }) - }) - describe('18 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { significantDigits: 18 })).toBe('0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { significantDigits: 18 })).toBe('1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { significantDigits: 18 })).toBe('12') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { significantDigits: 18 })).toBe('123') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { significantDigits: 18 })).toBe('1,234') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { significantDigits: 18 })).toBe('12,345') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { significantDigits: 18 })).toBe('123,456') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { significantDigits: 18 })).toBe('1,234,567') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { significantDigits: 18 })).toBe('12,345,678') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { significantDigits: 18 })).toBe('123,456,789') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { significantDigits: 18 })).toBe('1,234,567,891') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { significantDigits: 18 })).toBe('123,456,789,123,456,780') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { significantDigits: 18 })).toBe( - '123,456,789,123,456.79T', - ) - }) - }) - }) - describe('negative bigint', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(-0n, { significantDigits: 6, allowNegative: true })).toBe('0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(-1n, { significantDigits: 6, allowNegative: true })).toBe('-1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(-12n, { significantDigits: 6, allowNegative: true })).toBe('-12') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(-123n, { significantDigits: 6, allowNegative: true })).toBe('-123') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(-1234n, { significantDigits: 6, allowNegative: true })).toBe('-1,234') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(-12345n, { significantDigits: 6, allowNegative: true })).toBe('-12,345') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(-123456n, { significantDigits: 6, allowNegative: true })).toBe('-123,456') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(-1234567n, { significantDigits: 6, allowNegative: true })).toBe('-1.23457M') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(-12345678n, { significantDigits: 6, allowNegative: true })).toBe('-12.3457M') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(-123456789n, { significantDigits: 6, allowNegative: true })).toBe('-123.457M') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(-1234567891n, { significantDigits: 6, allowNegative: true })).toBe('-1.23457B') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(-123456789123456789n, { significantDigits: 6, allowNegative: true })).toBe( - '-123,457T', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789123456789n, { significantDigits: 6, allowNegative: true }), - ).toBe('-123,457,000,000,000T') - }) - }) - }) - }) - describe('currency', () => { - describe('number', () => { - describe('large numbers', () => { - describe('2 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { style: 'currency', significantDigits: 2 })).toBe('$1') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { style: 'currency', significantDigits: 2 })).toBe('$12') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { style: 'currency', significantDigits: 2 })).toBe('$120') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { style: 'currency', significantDigits: 2 })).toBe('$1.2K') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { style: 'currency', significantDigits: 2 })).toBe('$12K') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { style: 'currency', significantDigits: 2 })).toBe('$120K') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { style: 'currency', significantDigits: 2 })).toBe('$1.2M') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { style: 'currency', significantDigits: 2 })).toBe('$12M') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { style: 'currency', significantDigits: 2 })).toBe('$120M') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { style: 'currency', significantDigits: 2 })).toBe( - '$120,000T', - ) - }) - }) - describe('6 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { style: 'currency', significantDigits: 6 })).toBe('$1') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { style: 'currency', significantDigits: 6 })).toBe('$12') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { style: 'currency', significantDigits: 6 })).toBe('$123') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { style: 'currency', significantDigits: 6 })).toBe('$1,234') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { style: 'currency', significantDigits: 6 })).toBe('$12,345') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { style: 'currency', significantDigits: 6 })).toBe('$123,456') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { style: 'currency', significantDigits: 6 })).toBe('$1.23457M') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { style: 'currency', significantDigits: 6 })).toBe('$12.3457M') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { style: 'currency', significantDigits: 6 })).toBe('$123.457M') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$123,457T', - ) - }) - }) - describe('18 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { style: 'currency', significantDigits: 18 })).toBe('$1') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { style: 'currency', significantDigits: 18 })).toBe('$12') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { style: 'currency', significantDigits: 18 })).toBe('$123') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { style: 'currency', significantDigits: 18 })).toBe('$1,234') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { style: 'currency', significantDigits: 18 })).toBe('$12,345') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { style: 'currency', significantDigits: 18 })).toBe('$123,456') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { style: 'currency', significantDigits: 18 })).toBe('$1,234,567') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { style: 'currency', significantDigits: 18 })).toBe('$12,345,678') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { style: 'currency', significantDigits: 18 })).toBe('$123,456,789') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$123,457T', - ) - }) - }) - }) - describe('small numbers', () => { - describe('2 significantDigits', () => { - test('format number 123456.123456789 correctly', () => { - expect(formatDisplayNumber(123456.123456789, { style: 'currency', significantDigits: 2 })).toBe('$120K') - }) - test('format number 12345.123456789 correctly', () => { - expect(formatDisplayNumber(12345.123456789, { style: 'currency', significantDigits: 2 })).toBe('$12K') - }) - test('format number 1234.123456789 correctly', () => { - expect(formatDisplayNumber(1234.123456789, { style: 'currency', significantDigits: 2 })).toBe('$1.2K') - }) - test('format number 123.123456789 correctly', () => { - expect(formatDisplayNumber(123.123456789, { style: 'currency', significantDigits: 2 })).toBe('$120') - }) - test('format number 12.123456789 correctly', () => { - expect(formatDisplayNumber(12.123456789, { style: 'currency', significantDigits: 2 })).toBe('$12') - }) - test('format number 1.123456789 correctly', () => { - expect(formatDisplayNumber(1.123456789, { style: 'currency', significantDigits: 2 })).toBe('$1.1') - }) - test('format number 0.123456789 correctly', () => { - expect(formatDisplayNumber(0.123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.12') - }) - test('format number 0.0123456789 correctly', () => { - expect(formatDisplayNumber(0.0123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.012') - }) - test('format number 0.00123456789 correctly', () => { - expect(formatDisplayNumber(0.00123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.0012') - }) - test('format number 0.000123456789 correctly', () => { - expect(formatDisplayNumber(0.000123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.0₃12') - }) - test('format number 0.0000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.0₄12') - }) - test('format number 0.00000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.0₅12') - }) - test('format number 0.000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.0₆12') - }) - test('format number 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000123456789, { style: 'currency', significantDigits: 2 })).toBe('$0.0₇12') - }) - test('format number 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000123456789, { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₈12', - ) - }) - test('format number 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000123456789, { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₉12', - ) - }) - test('format number 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000000123456789, { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₁₀12', - ) - }) - test('format number 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000123456789, { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₁₁12', - ) - }) - test('format number 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000000123456789, { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₁₂12', - ) - }) - test('format number 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000000000000000123456789, { style: 'currency', significantDigits: 2 }), - ).toBe('$0.0₂₃12') - }) - }) - describe('6 significantDigits', () => { - test('format number 12345678.123456789 correctly', () => { - expect(formatDisplayNumber(12345678.123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$12.3457M', - ) - }) - test('format number 1234567.123456789 correctly', () => { - expect(formatDisplayNumber(1234567.123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$1.23457M', - ) - }) - test('format number 12345.123456789 correctly', () => { - expect(formatDisplayNumber(12345.123456789, { style: 'currency', significantDigits: 6 })).toBe('$12,345.1') - }) - test('format number 1234.123456789 correctly', () => { - expect(formatDisplayNumber(1234.123456789, { style: 'currency', significantDigits: 6 })).toBe('$1,234.12') - }) - test('format number 123.123456789 correctly', () => { - expect(formatDisplayNumber(123.123456789, { style: 'currency', significantDigits: 6 })).toBe('$123.123') - }) - test('format number 12.123456789 correctly', () => { - expect(formatDisplayNumber(12.123456789, { style: 'currency', significantDigits: 6 })).toBe('$12.1235') - }) - test('format number 1.123456789 correctly', () => { - expect(formatDisplayNumber(1.123456789, { style: 'currency', significantDigits: 6 })).toBe('$1.12346') - }) - test('format number 0.123456789 correctly', () => { - expect(formatDisplayNumber(0.123456789, { style: 'currency', significantDigits: 6 })).toBe('$0.123456') - }) - test('format number 0.0123456789 correctly', () => { - expect(formatDisplayNumber(0.0123456789, { style: 'currency', significantDigits: 6 })).toBe('$0.0123456') - }) - test('format number 0.00123456789 correctly', () => { - expect(formatDisplayNumber(0.00123456789, { style: 'currency', significantDigits: 6 })).toBe('$0.00123456') - }) - test('format number 0.000123456789 correctly', () => { - expect(formatDisplayNumber(0.000123456789, { style: 'currency', significantDigits: 6 })).toBe('$0.0₃123456') - }) - test('format number 0.0000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₄123456', - ) - }) - test('format number 0.00000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₅123456', - ) - }) - test('format number 0.000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₆123456', - ) - }) - test('format number 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₇123456', - ) - }) - test('format number 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₈123456', - ) - }) - test('format number 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₉123456', - ) - }) - test('format number 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₁₀123456', - ) - }) - test('format number 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₁₁123456', - ) - }) - test('format number 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000000123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₁₂123456', - ) - }) - test('format number 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000000000000000123456789, { style: 'currency', significantDigits: 6 }), - ).toBe('$0.0₂₃123456') - }) - }) - describe('18 significantDigits', () => { - test('format number 123456.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(123456.123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$123,456.12345678912') - }) - test('format number 12345.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(12345.123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$12,345.123456789124') - }) - test('format number 1234.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(1234.123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$1,234.1234567891236') - }) - test('format number 123.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(123.123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$123.12345678912345') - }) - test('format number 12.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(12.123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$12.123456789123457') - }) - test('format number 1.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(1.123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$1.1234567891234568') - }) - test('format number 0.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.12345678912345678') - }) - test('format number 0.0123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.012345678912345679') - }) - test('format number 0.00123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.001234567891234568') - }) - test('format number 0.000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₃1234567891234568') - }) - test('format number 0.0000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0000123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₄12345678912345678') - }) - test('format number 0.00000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₅12345678912345679') - }) - test('format number 0.000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000000123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₆1234567891234568') - }) - test('format number 0.0000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0000000123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₇1234567891234568') - }) - test('format number 0.00000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₈12345678912345678') - }) - test('format number 0.000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000000000123456789123456789123456789, { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₉1234567891234568') - }) - test('format number 0.0000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0000000000123456789123456789123456789, { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₁₀12345678912345678') - }) - test('format number 0.00000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000123456789123456789123456789, { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₁₁12345678912345678') - }) - test('format number 0.000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000000000000123456789123456789123456789, { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₁₂12345678912345678') - }) - test('format number 0.00000000000000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000000000000000123456789123456789123456789, { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₂₃12345678912345678') - }) - }) - }) - describe('negative numbers', () => { - test('format number -123456789123456789.123456789 correctly', () => { - expect(formatDisplayNumber(-123456789123456789.123456789, { style: 'currency', significantDigits: 6 })).toBe( - '$--', - ) - }) - test('format number -123456789123456789.123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789.123456789, { - style: 'currency', - significantDigits: 6, - allowNegative: true, - }), - ).toBe('-$123,457T') - }) - test('format number -1234567.123456789 correctly', () => { - expect( - formatDisplayNumber(-1234567.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$1.23457M') - }) - test('format number -123456.123456789 correctly', () => { - expect( - formatDisplayNumber(-123456.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$123,456') - }) - test('format number -12345.123456789 correctly', () => { - expect( - formatDisplayNumber(-12345.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$12,345.1') - }) - test('format number -1234.123456789 correctly', () => { - expect( - formatDisplayNumber(-1234.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$1,234.12') - }) - test('format number -123.123456789 correctly', () => { - expect( - formatDisplayNumber(-123.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$123.123') - }) - test('format number -12.123456789 correctly', () => { - expect( - formatDisplayNumber(-12.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$12.1235') - }) - test('format number -1.123456789 correctly', () => { - expect( - formatDisplayNumber(-1.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$1.12346') - }) - test('format number -0.123456789 correctly', () => { - expect( - formatDisplayNumber(-0.123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.123456') - }) - test('format number -0.0123456789 correctly', () => { - expect( - formatDisplayNumber(-0.0123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0123456') - }) - test('format number -0.00123456789 correctly', () => { - expect( - formatDisplayNumber(-0.00123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.00123456') - }) - test('format number -0.000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.000123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₃123456') - }) - test('format number -0.0000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.0000123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₄123456') - }) - test('format number -0.00000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.00000123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₅123456') - }) - test('format number -0.000000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.000000123456789, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₆123456') - }) - }) - }) - describe('string', () => { - describe('large strings', () => { - describe('2 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { style: 'currency', significantDigits: 2 })).toBe('$1') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { style: 'currency', significantDigits: 2 })).toBe('$12') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { style: 'currency', significantDigits: 2 })).toBe('$120') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { style: 'currency', significantDigits: 2 })).toBe('$1.2K') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { style: 'currency', significantDigits: 2 })).toBe('$12K') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { style: 'currency', significantDigits: 2 })).toBe('$120K') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { style: 'currency', significantDigits: 2 })).toBe('$1.2M') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { style: 'currency', significantDigits: 2 })).toBe('$12M') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { style: 'currency', significantDigits: 2 })).toBe('$120M') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$120,000T', - ) - }) - }) - describe('6 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { style: 'currency', significantDigits: 6 })).toBe('$1') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { style: 'currency', significantDigits: 6 })).toBe('$12') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { style: 'currency', significantDigits: 6 })).toBe('$123') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { style: 'currency', significantDigits: 6 })).toBe('$1,234') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { style: 'currency', significantDigits: 6 })).toBe('$12,345') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { style: 'currency', significantDigits: 6 })).toBe('$123,456') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { style: 'currency', significantDigits: 6 })).toBe('$1.23457M') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { style: 'currency', significantDigits: 6 })).toBe('$12.3457M') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { style: 'currency', significantDigits: 6 })).toBe('$123.457M') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$123,457T', - ) - }) - }) - describe('18 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { style: 'currency', significantDigits: 18 })).toBe('$1') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { style: 'currency', significantDigits: 18 })).toBe('$12') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { style: 'currency', significantDigits: 18 })).toBe('$123') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { style: 'currency', significantDigits: 18 })).toBe('$1,234') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { style: 'currency', significantDigits: 18 })).toBe('$12,345') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { style: 'currency', significantDigits: 18 })).toBe('$123,456') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { style: 'currency', significantDigits: 18 })).toBe('$1,234,567') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { style: 'currency', significantDigits: 18 })).toBe('$12,345,678') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { style: 'currency', significantDigits: 18 })).toBe('$123,456,789') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$123,457T', - ) - }) - }) - }) - describe('small strings', () => { - describe('2 significantDigits', () => { - test('format string 123456.123456789 correctly', () => { - expect(formatDisplayNumber('123456.123456789', { style: 'currency', significantDigits: 2 })).toBe('$120K') - }) - test('format string 12345.123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789', { style: 'currency', significantDigits: 2 })).toBe('$12K') - }) - test('format string 1234.123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789', { style: 'currency', significantDigits: 2 })).toBe('$1.2K') - }) - test('format string 123.123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789', { style: 'currency', significantDigits: 2 })).toBe('$120') - }) - test('format string 12.123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789', { style: 'currency', significantDigits: 2 })).toBe('$12') - }) - test('format string 1.123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789', { style: 'currency', significantDigits: 2 })).toBe('$1.1') - }) - test('format string 0.123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789', { style: 'currency', significantDigits: 2 })).toBe('$0.12') - }) - test('format string 0.0123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789', { style: 'currency', significantDigits: 2 })).toBe('$0.012') - }) - test('format string 0.00123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789', { style: 'currency', significantDigits: 2 })).toBe('$0.0012') - }) - test('format string 0.000123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789', { style: 'currency', significantDigits: 2 })).toBe('$0.0₃12') - }) - test('format string 0.0000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789', { style: 'currency', significantDigits: 2 })).toBe('$0.0₄12') - }) - test('format string 0.00000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789', { style: 'currency', significantDigits: 2 })).toBe('$0.0₅12') - }) - test('format string 0.000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₆12', - ) - }) - test('format string 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₇12', - ) - }) - test('format string 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₈12', - ) - }) - test('format string 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₉12', - ) - }) - test('format string 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₁₀12', - ) - }) - test('format string 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₁₁12', - ) - }) - test('format string 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789', { style: 'currency', significantDigits: 2 })).toBe( - '$0.0₁₂12', - ) - }) - test('format string 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000000000000000123456789', { style: 'currency', significantDigits: 2 }), - ).toBe('$0.0₂₃12') - }) - }) - describe('6 significantDigits', () => { - test('format string 12345678.123456789 correctly', () => { - expect(formatDisplayNumber('12345678.123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$12.3457M', - ) - }) - test('format string 1234567.123456789 correctly', () => { - expect(formatDisplayNumber('1234567.123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$1.23457M', - ) - }) - test('format string 12345.123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$12,345.1', - ) - }) - test('format string 1234.123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789', { style: 'currency', significantDigits: 6 })).toBe('$1,234.12') - }) - test('format string 123.123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789', { style: 'currency', significantDigits: 6 })).toBe('$123.123') - }) - test('format string 12.123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789', { style: 'currency', significantDigits: 6 })).toBe('$12.1235') - }) - test('format string 1.123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789', { style: 'currency', significantDigits: 6 })).toBe('$1.12346') - }) - test('format string 0.123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789', { style: 'currency', significantDigits: 6 })).toBe('$0.123456') - }) - test('format string 0.0123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789', { style: 'currency', significantDigits: 6 })).toBe('$0.0123456') - }) - test('format string 0.00123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.00123456', - ) - }) - test('format string 0.000123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₃123456', - ) - }) - test('format string 0.0000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₄123456', - ) - }) - test('format string 0.00000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₅123456', - ) - }) - test('format string 0.000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₆123456', - ) - }) - test('format string 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₇123456', - ) - }) - test('format string 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₈123456', - ) - }) - test('format string 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₉123456', - ) - }) - test('format string 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₁₀123456', - ) - }) - test('format string 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₁₁123456', - ) - }) - test('format string 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789', { style: 'currency', significantDigits: 6 })).toBe( - '$0.0₁₂123456', - ) - }) - test('format string 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000000000000000123456789', { style: 'currency', significantDigits: 6 }), - ).toBe('$0.0₂₃123456') - }) - }) - describe('18 significantDigits', () => { - test('format string 123456.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('123456.123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$123,456.12345678912') - }) - test('format string 12345.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('12345.123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$12,345.123456789124') - }) - test('format string 1234.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('1234.123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$1,234.1234567891236') - }) - test('format string 123.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('123.123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$123.12345678912345') - }) - test('format string 12.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('12.123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$12.123456789123457') - }) - test('format string 1.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('1.123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$1.1234567891234568') - }) - test('format string 0.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.123456789123456789') - }) - test('format string 0.0123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0123456789123456789') - }) - test('format string 0.00123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.00123456789123456789') - }) - test('format string 0.000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₃123456789123456789') - }) - test('format string 0.0000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0000123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₄123456789123456789') - }) - test('format string 0.00000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₅123456789123456789') - }) - test('format string 0.000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000000123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₆123456789123456789') - }) - test('format string 0.0000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0000000123456789123456789123456789', { style: 'currency', significantDigits: 18 }), - ).toBe('$0.0₇123456789123456789') - }) - test('format string 0.00000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000123456789123456789123456789', { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₈123456789123456789') - }) - test('format string 0.000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000000000123456789123456789123456789', { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₉123456789123456789') - }) - test('format string 0.0000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0000000000123456789123456789123456789', { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₁₀123456789123456789') - }) - test('format string 0.00000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000123456789123456789123456789', { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₁₁123456789123456789') - }) - test('format string 0.000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000000000000123456789123456789123456789', { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₁₂123456789123456789') - }) - test('format string 0.00000000000000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000000000000000123456789123456789123456789', { - style: 'currency', - significantDigits: 18, - }), - ).toBe('$0.0₂₃123456789123456789') - }) - }) - }) - describe('negative strings', () => { - test('format string -123456789123456789.123456789 correctly', () => { - expect( - formatDisplayNumber('-123456789123456789.123456789', { style: 'currency', significantDigits: 6 }), - ).toBe('$--') - }) - test('format string -123456789123456789.123456789 correctly', () => { - expect( - formatDisplayNumber('-123456789123456789.123456789', { - style: 'currency', - significantDigits: 6, - allowNegative: true, - }), - ).toBe('-$123,457T') - }) - test('format string -1234567.123456789 correctly', () => { - expect( - formatDisplayNumber('-1234567.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$1.23457M') - }) - test('format string -123456.123456789 correctly', () => { - expect( - formatDisplayNumber('-123456.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$123,456') - }) - test('format string -12345.123456789 correctly', () => { - expect( - formatDisplayNumber('-12345.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$12,345.1') - }) - test('format string -1234.123456789 correctly', () => { - expect( - formatDisplayNumber('-1234.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$1,234.12') - }) - test('format string -123.123456789 correctly', () => { - expect( - formatDisplayNumber('-123.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$123.123') - }) - test('format string -12.123456789 correctly', () => { - expect( - formatDisplayNumber('-12.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$12.1235') - }) - test('format string -1.123456789 correctly', () => { - expect( - formatDisplayNumber('-1.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$1.12346') - }) - test('format string -0.123456789 correctly', () => { - expect( - formatDisplayNumber('-0.123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.123456') - }) - test('format string -0.0123456789 correctly', () => { - expect( - formatDisplayNumber('-0.0123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0123456') - }) - test('format string -0.00123456789 correctly', () => { - expect( - formatDisplayNumber('-0.00123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.00123456') - }) - test('format string -0.000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.000123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₃123456') - }) - test('format string -0.0000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.0000123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₄123456') - }) - test('format string -0.00000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.00000123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₅123456') - }) - test('format string -0.000000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.000000123456789', { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$0.0₆123456') - }) - }) - }) - describe('bigint', () => { - describe('positive bigint', () => { - describe('2 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { style: 'currency', significantDigits: 2 })).toBe('$0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { style: 'currency', significantDigits: 2 })).toBe('$1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { style: 'currency', significantDigits: 2 })).toBe('$12') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { style: 'currency', significantDigits: 2 })).toBe('$120') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { style: 'currency', significantDigits: 2 })).toBe('$1.2K') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { style: 'currency', significantDigits: 2 })).toBe('$12K') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { style: 'currency', significantDigits: 2 })).toBe('$120K') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { style: 'currency', significantDigits: 2 })).toBe('$1.2M') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { style: 'currency', significantDigits: 2 })).toBe('$12M') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { style: 'currency', significantDigits: 2 })).toBe('$120M') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { style: 'currency', significantDigits: 2 })).toBe('$1.2B') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { style: 'currency', significantDigits: 2 })).toBe( - '$120,000T', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { style: 'currency', significantDigits: 2 })).toBe( - '$120,000,000,000,000T', - ) - }) - }) - describe('6 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { style: 'currency', significantDigits: 6 })).toBe('$0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { style: 'currency', significantDigits: 6 })).toBe('$1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { style: 'currency', significantDigits: 6 })).toBe('$12') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { style: 'currency', significantDigits: 6 })).toBe('$123') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { style: 'currency', significantDigits: 6 })).toBe('$1,234') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { style: 'currency', significantDigits: 6 })).toBe('$12,345') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { style: 'currency', significantDigits: 6 })).toBe('$123,456') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { style: 'currency', significantDigits: 6 })).toBe('$1.23457M') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { style: 'currency', significantDigits: 6 })).toBe('$12.3457M') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { style: 'currency', significantDigits: 6 })).toBe('$123.457M') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { style: 'currency', significantDigits: 6 })).toBe('$1.23457B') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { style: 'currency', significantDigits: 6 })).toBe( - '$123,457T', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { style: 'currency', significantDigits: 6 })).toBe( - '$123,457,000,000,000T', - ) - }) - }) - describe('18 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { style: 'currency', significantDigits: 18 })).toBe('$0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { style: 'currency', significantDigits: 18 })).toBe('$1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { style: 'currency', significantDigits: 18 })).toBe('$12') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { style: 'currency', significantDigits: 18 })).toBe('$123') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { style: 'currency', significantDigits: 18 })).toBe('$1,234') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { style: 'currency', significantDigits: 18 })).toBe('$12,345') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { style: 'currency', significantDigits: 18 })).toBe('$123,456') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { style: 'currency', significantDigits: 18 })).toBe('$1,234,567') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { style: 'currency', significantDigits: 18 })).toBe('$12,345,678') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { style: 'currency', significantDigits: 18 })).toBe('$123,456,789') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { style: 'currency', significantDigits: 18 })).toBe( - '$1,234,567,891', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { style: 'currency', significantDigits: 18 })).toBe( - '$123,456,789,123,456,780', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect( - formatDisplayNumber(123456789123456789123456789n, { style: 'currency', significantDigits: 18 }), - ).toBe('$123,456,789,123,456.79T') - }) - }) - }) - describe('negative bigint', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(-0n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe('$0') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(-1n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe('-$1') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(-12n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe( - '-$12', - ) - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(-123n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe( - '-$123', - ) - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(-1234n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe( - '-$1,234', - ) - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(-12345n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe( - '-$12,345', - ) - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(-123456n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe( - '-$123,456', - ) - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(-1234567n, { style: 'currency', significantDigits: 6, allowNegative: true })).toBe( - '-$1.23457M', - ) - }) - test('format bigint 12345678 correctly', () => { - expect( - formatDisplayNumber(-12345678n, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$12.3457M') - }) - test('format bigint 123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789n, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$123.457M') - }) - test('format bigint 1234567891 correctly', () => { - expect( - formatDisplayNumber(-1234567891n, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$1.23457B') - }) - test('format bigint 123456789123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789n, { style: 'currency', significantDigits: 6, allowNegative: true }), - ).toBe('-$123,457T') - }) - test('format bigint 123456789123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789123456789n, { - style: 'currency', - significantDigits: 6, - allowNegative: true, - }), - ).toBe('-$123,457,000,000,000T') - }) - }) - }) - }) - describe('percent', () => { - describe('number', () => { - describe('large numbers', () => { - describe('2 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { style: 'percent', significantDigits: 2 })).toBe('100%') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { style: 'percent', significantDigits: 2 })).toBe('1.2K%') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { style: 'percent', significantDigits: 2 })).toBe('12K%') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { style: 'percent', significantDigits: 2 })).toBe('120K%') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { style: 'percent', significantDigits: 2 })).toBe('1.2M%') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { style: 'percent', significantDigits: 2 })).toBe('12M%') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { style: 'percent', significantDigits: 2 })).toBe('120M%') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { style: 'percent', significantDigits: 2 })).toBe('1.2B%') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { style: 'percent', significantDigits: 2 })).toBe('12B%') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { style: 'percent', significantDigits: 2 })).toBe( - '12,000,000T%', - ) - }) - }) - describe('6 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { style: 'percent', significantDigits: 6 })).toBe('100%') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { style: 'percent', significantDigits: 6 })).toBe('1,200%') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { style: 'percent', significantDigits: 6 })).toBe('12,300%') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { style: 'percent', significantDigits: 6 })).toBe('123,400%') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { style: 'percent', significantDigits: 6 })).toBe('1.2345M%') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { style: 'percent', significantDigits: 6 })).toBe('12.3456M%') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { style: 'percent', significantDigits: 6 })).toBe('123.457M%') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { style: 'percent', significantDigits: 6 })).toBe('1.23457B%') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { style: 'percent', significantDigits: 6 })).toBe('12.3457B%') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { style: 'percent', significantDigits: 6 })).toBe( - '12,345,700T%', - ) - }) - }) - describe('18 significantDigits', () => { - test('format number 1 correctly', () => { - expect(formatDisplayNumber(1, { style: 'percent', significantDigits: 18 })).toBe('100%') - }) - test('format number 12 correctly', () => { - expect(formatDisplayNumber(12, { style: 'percent', significantDigits: 18 })).toBe('1,200%') - }) - test('format number 123 correctly', () => { - expect(formatDisplayNumber(123, { style: 'percent', significantDigits: 18 })).toBe('12,300%') - }) - test('format number 1234 correctly', () => { - expect(formatDisplayNumber(1234, { style: 'percent', significantDigits: 18 })).toBe('123,400%') - }) - test('format number 12345 correctly', () => { - expect(formatDisplayNumber(12345, { style: 'percent', significantDigits: 18 })).toBe('1,234,500%') - }) - test('format number 123456 correctly', () => { - expect(formatDisplayNumber(123456, { style: 'percent', significantDigits: 18 })).toBe('12,345,600%') - }) - test('format number 1234567 correctly', () => { - expect(formatDisplayNumber(1234567, { style: 'percent', significantDigits: 18 })).toBe('123,456,700%') - }) - test('format number 12345678 correctly', () => { - expect(formatDisplayNumber(12345678, { style: 'percent', significantDigits: 18 })).toBe('1,234,567,800%') - }) - test('format number 123456789 correctly', () => { - expect(formatDisplayNumber(123456789, { style: 'percent', significantDigits: 18 })).toBe('12,345,678,900%') - }) - test('format number 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789, { style: 'percent', significantDigits: 6 })).toBe( - '12,345,700T%', - ) - }) - }) - }) - describe('small numbers', () => { - describe('2 significantDigits', () => { - test('format number 123456.123456789 correctly', () => { - expect(formatDisplayNumber(123456.123456789, { style: 'percent', significantDigits: 2 })).toBe('12M%') - }) - test('format number 12345.123456789 correctly', () => { - expect(formatDisplayNumber(12345.123456789, { style: 'percent', significantDigits: 2 })).toBe('1.2M%') - }) - test('format number 1234.123456789 correctly', () => { - expect(formatDisplayNumber(1234.123456789, { style: 'percent', significantDigits: 2 })).toBe('120K%') - }) - test('format number 123.123456789 correctly', () => { - expect(formatDisplayNumber(123.123456789, { style: 'percent', significantDigits: 2 })).toBe('12K%') - }) - test('format number 12.123456789 correctly', () => { - expect(formatDisplayNumber(12.123456789, { style: 'percent', significantDigits: 2 })).toBe('1.2K%') - }) - test('format number 1.123456789 correctly', () => { - expect(formatDisplayNumber(1.123456789, { style: 'percent', significantDigits: 2 })).toBe('110%') - }) - test('format number 0.123456789 correctly', () => { - expect(formatDisplayNumber(0.123456789, { style: 'percent', significantDigits: 2 })).toBe('12%') - }) - test('format number 0.0123456789 correctly', () => { - expect(formatDisplayNumber(0.0123456789, { style: 'percent', significantDigits: 2 })).toBe('1.2%') - }) - test('format number 0.00123456789 correctly', () => { - expect(formatDisplayNumber(0.00123456789, { style: 'percent', significantDigits: 2 })).toBe('0.12%') - }) - test('format number 0.000123456789 correctly', () => { - expect(formatDisplayNumber(0.000123456789, { style: 'percent', significantDigits: 2 })).toBe('0.012%') - }) - test('format number 0.0000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000123456789, { style: 'percent', significantDigits: 2 })).toBe('0.0012%') - }) - test('format number 0.00000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000123456789, { style: 'percent', significantDigits: 2 })).toBe('0.0₃12%') - }) - test('format number 0.000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000123456789, { style: 'percent', significantDigits: 2 })).toBe('0.0₄12%') - }) - test('format number 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000123456789, { style: 'percent', significantDigits: 2 })).toBe('0.0₅12%') - }) - test('format number 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000123456789, { style: 'percent', significantDigits: 2 })).toBe('0.0₆12%') - }) - test('format number 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000123456789, { style: 'percent', significantDigits: 2 })).toBe( - '0.0₇12%', - ) - }) - test('format number 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000000123456789, { style: 'percent', significantDigits: 2 })).toBe( - '0.0₈12%', - ) - }) - test('format number 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000123456789, { style: 'percent', significantDigits: 2 })).toBe( - '0.0₉12%', - ) - }) - test('format number 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000000123456789, { style: 'percent', significantDigits: 2 })).toBe( - '0.0₁₀12%', - ) - }) - test('format number 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000000000000000123456789, { style: 'percent', significantDigits: 2 }), - ).toBe('0.0₂₁12%') - }) - }) - describe('6 significantDigits', () => { - test('format number 12345678.123456789 correctly', () => { - expect(formatDisplayNumber(12345678.123456789, { style: 'percent', significantDigits: 6 })).toBe( - '1.23457B%', - ) - }) - test('format number 1234567.123456789 correctly', () => { - expect(formatDisplayNumber(1234567.123456789, { style: 'percent', significantDigits: 6 })).toBe('123.457M%') - }) - test('format number 12345.123456789 correctly', () => { - expect(formatDisplayNumber(12345.123456789, { style: 'percent', significantDigits: 6 })).toBe('1.23451M%') - }) - test('format number 1234.123456789 correctly', () => { - expect(formatDisplayNumber(1234.123456789, { style: 'percent', significantDigits: 6 })).toBe('123,412%') - }) - test('format number 123.123456789 correctly', () => { - expect(formatDisplayNumber(123.123456789, { style: 'percent', significantDigits: 6 })).toBe('12,312.3%') - }) - test('format number 12.123456789 correctly', () => { - expect(formatDisplayNumber(12.123456789, { style: 'percent', significantDigits: 6 })).toBe('1,212.35%') - }) - test('format number 1.123456789 correctly', () => { - expect(formatDisplayNumber(1.123456789, { style: 'percent', significantDigits: 6 })).toBe('112.346%') - }) - test('format number 0.123456789 correctly', () => { - expect(formatDisplayNumber(0.123456789, { style: 'percent', significantDigits: 6 })).toBe('12.3457%') - }) - test('format number 0.0123456789 correctly', () => { - expect(formatDisplayNumber(0.0123456789, { style: 'percent', significantDigits: 6 })).toBe('1.23457%') - }) - test('format number 0.00123456789 correctly', () => { - expect(formatDisplayNumber(0.00123456789, { style: 'percent', significantDigits: 6 })).toBe('0.123456%') - }) - test('format number 0.000123456789 correctly', () => { - expect(formatDisplayNumber(0.000123456789, { style: 'percent', significantDigits: 6 })).toBe('0.0123456%') - }) - test('format number 0.0000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000123456789, { style: 'percent', significantDigits: 6 })).toBe('0.00123456%') - }) - test('format number 0.00000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₃123456%', - ) - }) - test('format number 0.000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₄123456%', - ) - }) - test('format number 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₅123456%', - ) - }) - test('format number 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₆123456%', - ) - }) - test('format number 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₇123456%', - ) - }) - test('format number 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.0000000000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₈123456%', - ) - }) - test('format number 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.00000000000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₉123456%', - ) - }) - test('format number 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber(0.000000000000123456789, { style: 'percent', significantDigits: 6 })).toBe( - '0.0₁₀123456%', - ) - }) - test('format number 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000000000000000123456789, { style: 'percent', significantDigits: 6 }), - ).toBe('0.0₂₁123456%') - }) - }) - describe('18 significantDigits', () => { - test('format number 123456.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(123456.123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('12,345,612.345678912%') - }) - test('format number 12345.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(12345.123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('1,234,512.3456789124%') - }) - test('format number 1234.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(1234.123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('123,412.34567891236%') - }) - test('format number 123.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(123.123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('12,312.345678912345%') - }) - test('format number 12.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(12.123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('1,212.3456789123457%') - }) - test('format number 1.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(1.123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('112.34567891234568%') - }) - test('format number 0.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('12.345678912345678%') - }) - test('format number 0.0123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('1.2345678912345679%') - }) - test('format number 0.00123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.1234567891234568%') - }) - test('format number 0.000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.01234567891234568%') - }) - test('format number 0.0000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.0012345678912345678%') - }) - test('format number 0.00000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₃12345678912345679%') - }) - test('format number 0.000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₄1234567891234568%') - }) - test('format number 0.0000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0000000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₅1234567891234568%') - }) - test('format number 0.00000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₆12345678912345678%') - }) - test('format number 0.000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000000000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₇1234567891234568%') - }) - test('format number 0.0000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.0000000000123456789123456789123456789, { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₈12345678912345678%') - }) - test('format number 0.00000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000123456789123456789123456789, { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₉12345678912345678%') - }) - test('format number 0.000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.000000000000123456789123456789123456789, { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₁₀12345678912345678%') - }) - test('format number 0.00000000000000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber(0.00000000000000000000000123456789123456789123456789, { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₂₁12345678912345678%') - }) - }) - }) - describe('negative numbers', () => { - test('format number -123456789123456789.123456789 correctly', () => { - expect(formatDisplayNumber(-123456789123456789.123456789, { style: 'percent', significantDigits: 6 })).toBe( - '--%', - ) - }) - test('format number -123456789123456789.123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789.123456789, { - style: 'percent', - significantDigits: 6, - allowNegative: true, - }), - ).toBe('-12,345,700T%') - }) - test('format number -1234567.123456789 correctly', () => { - expect( - formatDisplayNumber(-1234567.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-123.457M%') - }) - test('format number -123456.123456789 correctly', () => { - expect( - formatDisplayNumber(-123456.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12.3456M%') - }) - test('format number -12345.123456789 correctly', () => { - expect( - formatDisplayNumber(-12345.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-1.23451M%') - }) - test('format number -1234.123456789 correctly', () => { - expect( - formatDisplayNumber(-1234.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-123,412%') - }) - test('format number -123.123456789 correctly', () => { - expect( - formatDisplayNumber(-123.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12,312.3%') - }) - test('format number -12.123456789 correctly', () => { - expect( - formatDisplayNumber(-12.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-1,212.35%') - }) - test('format number -1.123456789 correctly', () => { - expect( - formatDisplayNumber(-1.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-112.346%') - }) - test('format number -0.123456789 correctly', () => { - expect( - formatDisplayNumber(-0.123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12.3457%') - }) - test('format number -0.0123456789 correctly', () => { - expect( - formatDisplayNumber(-0.0123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-1.23457%') - }) - test('format number -0.00123456789 correctly', () => { - expect( - formatDisplayNumber(-0.00123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.123456%') - }) - test('format number -0.000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.000123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.0123456%') - }) - test('format number -0.0000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.0000123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.00123456%') - }) - test('format number -0.00000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.00000123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.0₃123456%') - }) - test('format number -0.000000123456789 correctly', () => { - expect( - formatDisplayNumber(-0.000000123456789, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.0₄123456%') - }) - }) - }) - describe('string', () => { - describe('large strings', () => { - describe('2 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { style: 'percent', significantDigits: 2 })).toBe('100%') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { style: 'percent', significantDigits: 2 })).toBe('1.2K%') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { style: 'percent', significantDigits: 2 })).toBe('12K%') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { style: 'percent', significantDigits: 2 })).toBe('120K%') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { style: 'percent', significantDigits: 2 })).toBe('1.2M%') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { style: 'percent', significantDigits: 2 })).toBe('12M%') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { style: 'percent', significantDigits: 2 })).toBe('120M%') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { style: 'percent', significantDigits: 2 })).toBe('1.2B%') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { style: 'percent', significantDigits: 2 })).toBe('12B%') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { style: 'percent', significantDigits: 2 })).toBe( - '12,000,000T%', - ) - }) - }) - describe('6 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { style: 'percent', significantDigits: 6 })).toBe('100%') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { style: 'percent', significantDigits: 6 })).toBe('1,200%') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { style: 'percent', significantDigits: 6 })).toBe('12,300%') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { style: 'percent', significantDigits: 6 })).toBe('123,400%') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { style: 'percent', significantDigits: 6 })).toBe('1.2345M%') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { style: 'percent', significantDigits: 6 })).toBe('12.3456M%') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { style: 'percent', significantDigits: 6 })).toBe('123.457M%') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { style: 'percent', significantDigits: 6 })).toBe('1.23457B%') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { style: 'percent', significantDigits: 6 })).toBe('12.3457B%') - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { style: 'percent', significantDigits: 6 })).toBe( - '12,345,700T%', - ) - }) - }) - describe('18 significantDigits', () => { - test('format string 1 correctly', () => { - expect(formatDisplayNumber('1', { style: 'percent', significantDigits: 18 })).toBe('100%') - }) - test('format string 12 correctly', () => { - expect(formatDisplayNumber('12', { style: 'percent', significantDigits: 18 })).toBe('1,200%') - }) - test('format string 123 correctly', () => { - expect(formatDisplayNumber('123', { style: 'percent', significantDigits: 18 })).toBe('12,300%') - }) - test('format string 1234 correctly', () => { - expect(formatDisplayNumber('1234', { style: 'percent', significantDigits: 18 })).toBe('123,400%') - }) - test('format string 12345 correctly', () => { - expect(formatDisplayNumber('12345', { style: 'percent', significantDigits: 18 })).toBe('1,234,500%') - }) - test('format string 123456 correctly', () => { - expect(formatDisplayNumber('123456', { style: 'percent', significantDigits: 18 })).toBe('12,345,600%') - }) - test('format string 1234567 correctly', () => { - expect(formatDisplayNumber('1234567', { style: 'percent', significantDigits: 18 })).toBe('123,456,700%') - }) - test('format string 12345678 correctly', () => { - expect(formatDisplayNumber('12345678', { style: 'percent', significantDigits: 18 })).toBe('1,234,567,800%') - }) - test('format string 123456789 correctly', () => { - expect(formatDisplayNumber('123456789', { style: 'percent', significantDigits: 18 })).toBe( - '12,345,678,900%', - ) - }) - test('format string 123456789123456789 correctly', () => { - expect(formatDisplayNumber('123456789123456789', { style: 'percent', significantDigits: 6 })).toBe( - '12,345,700T%', - ) - }) - }) - }) - describe('small strings', () => { - describe('2 significantDigits', () => { - test('format string 123456.123456789 correctly', () => { - expect(formatDisplayNumber('123456.123456789', { style: 'percent', significantDigits: 2 })).toBe('12M%') - }) - test('format string 12345.123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789', { style: 'percent', significantDigits: 2 })).toBe('1.2M%') - }) - test('format string 1234.123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789', { style: 'percent', significantDigits: 2 })).toBe('120K%') - }) - test('format string 123.123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789', { style: 'percent', significantDigits: 2 })).toBe('12K%') - }) - test('format string 12.123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789', { style: 'percent', significantDigits: 2 })).toBe('1.2K%') - }) - test('format string 1.123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789', { style: 'percent', significantDigits: 2 })).toBe('110%') - }) - test('format string 0.123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789', { style: 'percent', significantDigits: 2 })).toBe('12%') - }) - test('format string 0.0123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789', { style: 'percent', significantDigits: 2 })).toBe('1.2%') - }) - test('format string 0.00123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789', { style: 'percent', significantDigits: 2 })).toBe('0.12%') - }) - test('format string 0.000123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789', { style: 'percent', significantDigits: 2 })).toBe('0.012%') - }) - test('format string 0.0000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789', { style: 'percent', significantDigits: 2 })).toBe('0.0012%') - }) - test('format string 0.00000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789', { style: 'percent', significantDigits: 2 })).toBe('0.0₃12%') - }) - test('format string 0.000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789', { style: 'percent', significantDigits: 2 })).toBe('0.0₄12%') - }) - test('format string 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789', { style: 'percent', significantDigits: 2 })).toBe( - '0.0₅12%', - ) - }) - test('format string 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789', { style: 'percent', significantDigits: 2 })).toBe( - '0.0₆12%', - ) - }) - test('format string 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789', { style: 'percent', significantDigits: 2 })).toBe( - '0.0₇12%', - ) - }) - test('format string 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789', { style: 'percent', significantDigits: 2 })).toBe( - '0.0₈12%', - ) - }) - test('format string 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789', { style: 'percent', significantDigits: 2 })).toBe( - '0.0₉12%', - ) - }) - test('format string 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789', { style: 'percent', significantDigits: 2 })).toBe( - '0.0₁₀12%', - ) - }) - test('format string 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000000000000000123456789', { style: 'percent', significantDigits: 2 }), - ).toBe('0.0₂₁12%') - }) - }) - describe('6 significantDigits', () => { - test('format string 12345678.123456789 correctly', () => { - expect(formatDisplayNumber('12345678.123456789', { style: 'percent', significantDigits: 6 })).toBe( - '1.23457B%', - ) - }) - test('format string 1234567.123456789 correctly', () => { - expect(formatDisplayNumber('1234567.123456789', { style: 'percent', significantDigits: 6 })).toBe( - '123.457M%', - ) - }) - test('format string 12345.123456789 correctly', () => { - expect(formatDisplayNumber('12345.123456789', { style: 'percent', significantDigits: 6 })).toBe('1.23451M%') - }) - test('format string 1234.123456789 correctly', () => { - expect(formatDisplayNumber('1234.123456789', { style: 'percent', significantDigits: 6 })).toBe('123,412%') - }) - test('format string 123.123456789 correctly', () => { - expect(formatDisplayNumber('123.123456789', { style: 'percent', significantDigits: 6 })).toBe('12,312.3%') - }) - test('format string 12.123456789 correctly', () => { - expect(formatDisplayNumber('12.123456789', { style: 'percent', significantDigits: 6 })).toBe('1,212.35%') - }) - test('format string 1.123456789 correctly', () => { - expect(formatDisplayNumber('1.123456789', { style: 'percent', significantDigits: 6 })).toBe('112.346%') - }) - test('format string 0.123456789 correctly', () => { - expect(formatDisplayNumber('0.123456789', { style: 'percent', significantDigits: 6 })).toBe('12.3457%') - }) - test('format string 0.0123456789 correctly', () => { - expect(formatDisplayNumber('0.0123456789', { style: 'percent', significantDigits: 6 })).toBe('1.23457%') - }) - test('format string 0.00123456789 correctly', () => { - expect(formatDisplayNumber('0.00123456789', { style: 'percent', significantDigits: 6 })).toBe('0.123456%') - }) - test('format string 0.000123456789 correctly', () => { - expect(formatDisplayNumber('0.000123456789', { style: 'percent', significantDigits: 6 })).toBe('0.0123456%') - }) - test('format string 0.0000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.00123456%', - ) - }) - test('format string 0.00000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₃123456%', - ) - }) - test('format string 0.000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₄123456%', - ) - }) - test('format string 0.0000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₅123456%', - ) - }) - test('format string 0.00000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₆123456%', - ) - }) - test('format string 0.000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₇123456%', - ) - }) - test('format string 0.0000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.0000000000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₈123456%', - ) - }) - test('format string 0.00000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.00000000000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₉123456%', - ) - }) - test('format string 0.000000000000123456789 correctly', () => { - expect(formatDisplayNumber('0.000000000000123456789', { style: 'percent', significantDigits: 6 })).toBe( - '0.0₁₀123456%', - ) - }) - test('format string 0.00000000000000000000000123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000000000000000123456789', { style: 'percent', significantDigits: 6 }), - ).toBe('0.0₂₁123456%') - }) - }) - describe('18 significantDigits', () => { - test('format string 123456.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('123456.123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('12,345,612.345678912%') - }) - test('format string 12345.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('12345.123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('1,234,512.3456789124%') - }) - test('format string 1234.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('1234.123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('123,412.34567891236%') - }) - test('format string 123.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('123.123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('12,312.345678912345%') - }) - test('format string 12.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('12.123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('1,212.3456789123457%') - }) - test('format string 1.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('1.123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('112.34567891234568%') - }) - test('format string 0.123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('12.345678912345678%') - }) - test('format string 0.0123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('1.2345678912345679%') - }) - test('format string 0.00123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('0.123456789123456789%') - }) - test('format string 0.000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('0.0123456789123456789%') - }) - test('format string 0.0000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0000123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('0.00123456789123456789%') - }) - test('format string 0.00000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₃123456789123456789%') - }) - test('format string 0.000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000000123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₄123456789123456789%') - }) - test('format string 0.0000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0000000123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₅123456789123456789%') - }) - test('format string 0.00000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000123456789123456789123456789', { style: 'percent', significantDigits: 18 }), - ).toBe('0.0₆123456789123456789%') - }) - test('format string 0.000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000000000123456789123456789123456789', { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₇123456789123456789%') - }) - test('format string 0.0000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.0000000000123456789123456789123456789', { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₈123456789123456789%') - }) - test('format string 0.00000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000123456789123456789123456789', { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₉123456789123456789%') - }) - test('format string 0.000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.000000000000123456789123456789123456789', { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₁₀123456789123456789%') - }) - test('format string 0.00000000000000000000000123456789123456789123456789 correctly', () => { - expect( - formatDisplayNumber('0.00000000000000000000000123456789123456789123456789', { - style: 'percent', - significantDigits: 18, - }), - ).toBe('0.0₂₁123456789123456789%') - }) - }) - }) - describe('negative strings', () => { - test('format string -123456789123456789.123456789 correctly', () => { - expect(formatDisplayNumber('-123456789123456789.123456789', { style: 'percent', significantDigits: 6 })).toBe( - '--%', - ) - }) - test('format string -123456789123456789.123456789 correctly', () => { - expect( - formatDisplayNumber('-123456789123456789.123456789', { - style: 'percent', - significantDigits: 6, - allowNegative: true, - }), - ).toBe('-12,345,700T%') - }) - test('format string -1234567.123456789 correctly', () => { - expect( - formatDisplayNumber('-1234567.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-123.457M%') - }) - test('format string -123456.123456789 correctly', () => { - expect( - formatDisplayNumber('-123456.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12.3456M%') - }) - test('format string -12345.123456789 correctly', () => { - expect( - formatDisplayNumber('-12345.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-1.23451M%') - }) - test('format string -1234.123456789 correctly', () => { - expect( - formatDisplayNumber('-1234.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-123,412%') - }) - test('format string -123.123456789 correctly', () => { - expect( - formatDisplayNumber('-123.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12,312.3%') - }) - test('format string -12.123456789 correctly', () => { - expect( - formatDisplayNumber('-12.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-1,212.35%') - }) - test('format string -1.123456789 correctly', () => { - expect( - formatDisplayNumber('-1.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-112.346%') - }) - test('format string -0.123456789 correctly', () => { - expect( - formatDisplayNumber('-0.123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12.3457%') - }) - test('format string -0.0123456789 correctly', () => { - expect( - formatDisplayNumber('-0.0123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-1.23457%') - }) - test('format string -0.00123456789 correctly', () => { - expect( - formatDisplayNumber('-0.00123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.123456%') - }) - test('format string -0.000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.000123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.0123456%') - }) - test('format string -0.0000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.0000123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.00123456%') - }) - test('format string -0.00000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.00000123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.0₃123456%') - }) - test('format string -0.000000123456789 correctly', () => { - expect( - formatDisplayNumber('-0.000000123456789', { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-0.0₄123456%') - }) - }) - }) - describe('bigint', () => { - describe('positive bigint', () => { - describe('2 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { style: 'percent', significantDigits: 2 })).toBe('0%') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { style: 'percent', significantDigits: 2 })).toBe('100%') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { style: 'percent', significantDigits: 2 })).toBe('1.2K%') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { style: 'percent', significantDigits: 2 })).toBe('12K%') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { style: 'percent', significantDigits: 2 })).toBe('120K%') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { style: 'percent', significantDigits: 2 })).toBe('1.2M%') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { style: 'percent', significantDigits: 2 })).toBe('12M%') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { style: 'percent', significantDigits: 2 })).toBe('120M%') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { style: 'percent', significantDigits: 2 })).toBe('1.2B%') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { style: 'percent', significantDigits: 2 })).toBe('12B%') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { style: 'percent', significantDigits: 2 })).toBe('120B%') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { style: 'percent', significantDigits: 2 })).toBe( - '12,000,000T%', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { style: 'percent', significantDigits: 2 })).toBe( - '12,000,000,000,000,000T%', - ) - }) - }) - describe('6 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { style: 'percent', significantDigits: 6 })).toBe('0%') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { style: 'percent', significantDigits: 6 })).toBe('100%') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { style: 'percent', significantDigits: 6 })).toBe('1,200%') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { style: 'percent', significantDigits: 6 })).toBe('12,300%') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { style: 'percent', significantDigits: 6 })).toBe('123,400%') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { style: 'percent', significantDigits: 6 })).toBe('1.2345M%') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { style: 'percent', significantDigits: 6 })).toBe('12.3456M%') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { style: 'percent', significantDigits: 6 })).toBe('123.457M%') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { style: 'percent', significantDigits: 6 })).toBe('1.23457B%') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { style: 'percent', significantDigits: 6 })).toBe('12.3457B%') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { style: 'percent', significantDigits: 6 })).toBe('123.457B%') - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { style: 'percent', significantDigits: 6 })).toBe( - '12,345,700T%', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { style: 'percent', significantDigits: 6 })).toBe( - '12,345,700,000,000,000T%', - ) - }) - }) - describe('18 significantDigits', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(0n, { style: 'percent', significantDigits: 18 })).toBe('0%') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(1n, { style: 'percent', significantDigits: 18 })).toBe('100%') - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(12n, { style: 'percent', significantDigits: 18 })).toBe('1,200%') - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(123n, { style: 'percent', significantDigits: 18 })).toBe('12,300%') - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(1234n, { style: 'percent', significantDigits: 18 })).toBe('123,400%') - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(12345n, { style: 'percent', significantDigits: 18 })).toBe('1,234,500%') - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(123456n, { style: 'percent', significantDigits: 18 })).toBe('12,345,600%') - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(1234567n, { style: 'percent', significantDigits: 18 })).toBe('123,456,700%') - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(12345678n, { style: 'percent', significantDigits: 18 })).toBe('1,234,567,800%') - }) - test('format bigint 123456789 correctly', () => { - expect(formatDisplayNumber(123456789n, { style: 'percent', significantDigits: 18 })).toBe('12,345,678,900%') - }) - test('format bigint 1234567891 correctly', () => { - expect(formatDisplayNumber(1234567891n, { style: 'percent', significantDigits: 18 })).toBe( - '123,456,789,100%', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789n, { style: 'percent', significantDigits: 18 })).toBe( - '12,345,678.912345678T%', - ) - }) - test('format bigint 123456789123456789 correctly', () => { - expect(formatDisplayNumber(123456789123456789123456789n, { style: 'percent', significantDigits: 18 })).toBe( - '12,345,678,912,345,679T%', - ) - }) - }) - }) - describe('negative bigint', () => { - test('format bigint 0 correctly', () => { - expect(formatDisplayNumber(-0n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe('0%') - }) - test('format bigint 1 correctly', () => { - expect(formatDisplayNumber(-1n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-100%', - ) - }) - test('format bigint 12 correctly', () => { - expect(formatDisplayNumber(-12n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-1,200%', - ) - }) - test('format bigint 123 correctly', () => { - expect(formatDisplayNumber(-123n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-12,300%', - ) - }) - test('format bigint 1234 correctly', () => { - expect(formatDisplayNumber(-1234n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-123,400%', - ) - }) - test('format bigint 12345 correctly', () => { - expect(formatDisplayNumber(-12345n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-1.2345M%', - ) - }) - test('format bigint 123456 correctly', () => { - expect(formatDisplayNumber(-123456n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-12.3456M%', - ) - }) - test('format bigint 1234567 correctly', () => { - expect(formatDisplayNumber(-1234567n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-123.457M%', - ) - }) - test('format bigint 12345678 correctly', () => { - expect(formatDisplayNumber(-12345678n, { style: 'percent', significantDigits: 6, allowNegative: true })).toBe( - '-1.23457B%', - ) - }) - test('format bigint 123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789n, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12.3457B%') - }) - test('format bigint 1234567891 correctly', () => { - expect( - formatDisplayNumber(-1234567891n, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-123.457B%') - }) - test('format bigint 123456789123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789n, { style: 'percent', significantDigits: 6, allowNegative: true }), - ).toBe('-12,345,700T%') - }) - test('format bigint 123456789123456789 correctly', () => { - expect( - formatDisplayNumber(-123456789123456789123456789n, { - style: 'percent', - significantDigits: 6, - allowNegative: true, - }), - ).toBe('-12,345,700,000,000,000T%') - }) - }) - }) - }) - describe('Fraction', () => { - test('format Fraction 1/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('1', 123456789), { significantDigits: 6 })).toBe('0.0₈81') - }) - test('format Fraction 12/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('12', 123456789), { significantDigits: 6 })).toBe('0.0₇972') - }) - test('format Fraction 123/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('123', 123456789), { significantDigits: 6 })).toBe('0.0₆9963') - }) - test('format Fraction 1234/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('1234', 123456789), { significantDigits: 6 })).toBe('0.0₅99954') - }) - test('format Fraction 12345/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('12345', 123456789), { significantDigits: 6 })).toBe('0.0₄999945') - }) - test('format Fraction 123456/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('123456', 123456789), { significantDigits: 6 })).toBe('0.0₃999993') - }) - test('format Fraction 1234567/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('1234567', 123456789), { significantDigits: 6 })).toBe('0.00999999') - }) - test('format Fraction 12345678/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('12345678', 123456789), { significantDigits: 6 })).toBe('0.0999999') - }) - test('format Fraction 123456789/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('123456789', 123456789), { significantDigits: 6 })).toBe('1') - }) - test('format Fraction 123456789123456789/123456789 correctly', () => { - expect(formatDisplayNumber(new Fraction('123456789123456789', 123456789), { significantDigits: 6 })).toBe('1B') - }) - test('format Fraction 123456789123456789/77777 correctly', () => { - expect(formatDisplayNumber(new Fraction('123456789123456789', 77777), { significantDigits: 6 })).toBe('1.58732T') - }) - }) - describe('Price', () => { - let token1: Token, token2: Token, quoteAmount: CurrencyAmount - beforeAll(() => { - token1 = new Token(1, '0x0000000000000000000000000000000000000000', 9) - token2 = new Token(1, '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 12) - quoteAmount = CurrencyAmount.fromFractionalAmount(token2, '4567891237899', 456123456789) - }) - test('format Price 1/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '1', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('1.23637M') - }) - test('format Price 12/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '12', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('103,031') - }) - test('format Price 123/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '123', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('10,051.8') - }) - test('format Price 1234/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '1234', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('1,001.92') - }) - test('format Price 12345/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '12345', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('100.151') - }) - test('format Price 123456/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '123456', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('10.0147') - }) - test('format Price 1234567/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '1234567', 123456789), - quoteAmount, - }), - { - significantDigits: 6, - }, - ), - ).toBe('1.00146') - }) - test('format Price 12345678/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '12345678', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('0.100145') - }) - test('format Price 123456789/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '123456789', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('0.0100145') - }) - test('format Price 123456789123456789/123456789 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '123456789123456789', 123456789), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('0.0₁₀100145') - }) - test('format Price 123456789123456789/77777 correctly', () => { - expect( - formatDisplayNumber( - new Price({ - baseAmount: CurrencyAmount.fromFractionalAmount(token1, '123456789123456789', 77777), - quoteAmount, - }), - { significantDigits: 6 }, - ), - ).toBe('0.0₁₄6309') - }) - }) - describe('Percent', () => { - describe('decimal', () => { - test('format Percent 1/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('1', 123456789), { significantDigits: 6 })).toBe('0.0₈81') - }) - test('format Percent 12/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('12', 123456789), { significantDigits: 6 })).toBe('0.0₇972') - }) - test('format Percent 123/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('123', 123456789), { significantDigits: 6 })).toBe('0.0₆9963') - }) - test('format Percent 1234/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('1234', 123456789), { significantDigits: 6 })).toBe('0.0₅99954') - }) - test('format Percent 12345/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('12345', 123456789), { significantDigits: 6 })).toBe('0.0₄999945') - }) - test('format Percent 123456/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('123456', 123456789), { significantDigits: 6 })).toBe('0.0₃999993') - }) - test('format Percent 1234567/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('1234567', 123456789), { significantDigits: 6 })).toBe('0.00999999') - }) - test('format Percent 12345678/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('12345678', 123456789), { significantDigits: 6 })).toBe('0.0999999') - }) - test('format Percent 123456789/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('123456789', 123456789), { significantDigits: 6 })).toBe('1') - }) - test('format Percent 1234567891/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('1234567891', 123456789), { significantDigits: 6 })).toBe('10') - }) - test('format Percent 12345678912/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('12345678912', 123456789), { significantDigits: 6 })).toBe('100') - }) - test('format Percent 123456789123456789/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('123456789123456789', 123456789), { significantDigits: 6 })).toBe('1B') - }) - test('format Percent 123456789123456789/77777 correctly', () => { - expect(formatDisplayNumber(new Percent('123456789123456789', 77777), { significantDigits: 6 })).toBe('1.58732T') - }) - }) - describe('percent', () => { - test('format Percent 1/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('1', 123456789), { style: 'percent', significantDigits: 6 })).toBe( - '0.0₆81%', - ) - }) - test('format Percent 12/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('12', 123456789), { style: 'percent', significantDigits: 6 })).toBe( - '0.0₅972%', - ) - }) - test('format Percent 123/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('123', 123456789), { style: 'percent', significantDigits: 6 })).toBe( - '0.0₄9963%', - ) - }) - test('format Percent 1234/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('1234', 123456789), { style: 'percent', significantDigits: 6 })).toBe( - '0.0₃99954%', - ) - }) - test('format Percent 12345/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('12345', 123456789), { style: 'percent', significantDigits: 6 })).toBe( - '0.00999945%', - ) - }) - test('format Percent 123456/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('123456', 123456789), { style: 'percent', significantDigits: 6 })).toBe( - '0.0999993%', - ) - }) - test('format Percent 1234567/123456789 correctly', () => { - expect(formatDisplayNumber(new Percent('1234567', 123456789), { style: 'percent', significantDigits: 6 })).toBe( - '0.999999%', - ) - }) - test('format Percent 12345678/123456789 correctly', () => { - expect( - formatDisplayNumber(new Percent('12345678', 123456789), { style: 'percent', significantDigits: 6 }), - ).toBe('10%') - }) - test('format Percent 123456789/123456789 correctly', () => { - expect( - formatDisplayNumber(new Percent('123456789', 123456789), { style: 'percent', significantDigits: 6 }), - ).toBe('100%') - }) - test('format Percent 1234567891/123456789 correctly', () => { - expect( - formatDisplayNumber(new Percent('1234567891', 123456789), { style: 'percent', significantDigits: 6 }), - ).toBe('1,000%') - }) - test('format Percent 12345678912/123456789 correctly', () => { - expect( - formatDisplayNumber(new Percent('12345678912', 123456789), { style: 'percent', significantDigits: 6 }), - ).toBe('10,000%') - }) - test('format Percent 123456789123456789/123456789 correctly', () => { - expect( - formatDisplayNumber(new Percent('123456789123456789', 123456789), { style: 'percent', significantDigits: 6 }), - ).toBe('100B%') - }) - test('format Percent 123456789123456789/77777 correctly', () => { - expect( - formatDisplayNumber(new Percent('123456789123456789', 77777), { style: 'percent', significantDigits: 6 }), - ).toBe('158.732T%') - }) - }) - }) -}) diff --git a/vite.config.ts b/vite.config.ts index 5f84f4b973..e58c3226cb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,4 +1,3 @@ -/// import GlobalPolyFill from '@esbuild-plugins/node-globals-polyfill' import lingui from '@lingui/vite-plugin' import react from '@vitejs/plugin-react' @@ -61,7 +60,4 @@ export default defineConfig({ host: '127.0.0.1', open: true, }, - test: { - environment: 'jsdom', - }, }) diff --git a/yarn.lock b/yarn.lock index 19bbfa1e28..922d904879 100644 --- a/yarn.lock +++ b/yarn.lock @@ -995,221 +995,111 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.15.tgz#893ad71f3920ccb919e1757c387756a9bca2ef42" integrity sha512-0kOB6Y7Br3KDVgHeg8PRcvfLkq+AccreK///B4Z6fNZGr/tNHX0z2VywCc7PTeWp+bPvjA5WMvNXltHw5QjAIA== -"@esbuild/android-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" - integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== - "@esbuild/android-arm@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.15.tgz#143e0d4e4c08c786ea410b9a7739779a9a1315d8" integrity sha512-sRSOVlLawAktpMvDyJIkdLI/c/kdRTOqo8t6ImVxg8yT7LQDUYV5Rp2FKeEosLr6ZCja9UjYAzyRSxGteSJPYg== -"@esbuild/android-arm@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" - integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== - "@esbuild/android-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.15.tgz#d2d12a7676b2589864281b2274355200916540bc" integrity sha512-MzDqnNajQZ63YkaUWVl9uuhcWyEyh69HGpMIrf+acR4otMkfLJ4sUCxqwbCyPGicE9dVlrysI3lMcDBjGiBBcQ== -"@esbuild/android-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" - integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== - "@esbuild/darwin-arm64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.15.tgz#2e88e79f1d327a2a7d9d06397e5232eb0a473d61" integrity sha512-7siLjBc88Z4+6qkMDxPT2juf2e8SJxmsbNVKFY2ifWCDT72v5YJz9arlvBw5oB4W/e61H1+HDB/jnu8nNg0rLA== -"@esbuild/darwin-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" - integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== - "@esbuild/darwin-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.15.tgz#9384e64c0be91388c57be6d3a5eaf1c32a99c91d" integrity sha512-NbImBas2rXwYI52BOKTW342Tm3LTeVlaOQ4QPZ7XuWNKiO226DisFk/RyPk3T0CKZkKMuU69yOvlapJEmax7cg== -"@esbuild/darwin-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" - integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== - "@esbuild/freebsd-arm64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.15.tgz#2ad5a35bc52ebd9ca6b845dbc59ba39647a93c1a" integrity sha512-Xk9xMDjBVG6CfgoqlVczHAdJnCs0/oeFOspFap5NkYAmRCT2qTn1vJWA2f419iMtsHSLm+O8B6SLV/HlY5cYKg== -"@esbuild/freebsd-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" - integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== - "@esbuild/freebsd-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.15.tgz#b513a48446f96c75fda5bef470e64d342d4379cd" integrity sha512-3TWAnnEOdclvb2pnfsTWtdwthPfOz7qAfcwDLcfZyGJwm1SRZIMOeB5FODVhnM93mFSPsHB9b/PmxNNbSnd0RQ== -"@esbuild/freebsd-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" - integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== - "@esbuild/linux-arm64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.15.tgz#9697b168175bfd41fa9cc4a72dd0d48f24715f31" integrity sha512-T0MVnYw9KT6b83/SqyznTs/3Jg2ODWrZfNccg11XjDehIved2oQfrX/wVuev9N936BpMRaTR9I1J0tdGgUgpJA== -"@esbuild/linux-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" - integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== - "@esbuild/linux-arm@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.15.tgz#5b22062c54f48cd92fab9ffd993732a52db70cd3" integrity sha512-MLTgiXWEMAMr8nmS9Gigx43zPRmEfeBfGCwxFQEMgJ5MC53QKajaclW6XDPjwJvhbebv+RzK05TQjvH3/aM4Xw== -"@esbuild/linux-arm@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" - integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== - "@esbuild/linux-ia32@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.15.tgz#eb28a13f9b60b5189fcc9e98e1024f6b657ba54c" integrity sha512-wp02sHs015T23zsQtU4Cj57WiteiuASHlD7rXjKUyAGYzlOKDAjqK6bk5dMi2QEl/KVOcsjwL36kD+WW7vJt8Q== -"@esbuild/linux-ia32@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" - integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== - "@esbuild/linux-loong64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.15.tgz#32454bdfe144cf74b77895a8ad21a15cb81cfbe5" integrity sha512-k7FsUJjGGSxwnBmMh8d7IbObWu+sF/qbwc+xKZkBe/lTAF16RqxRCnNHA7QTd3oS2AfGBAnHlXL67shV5bBThQ== -"@esbuild/linux-loong64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" - integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== - "@esbuild/linux-mips64el@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.15.tgz#af12bde0d775a318fad90eb13a0455229a63987c" integrity sha512-ZLWk6czDdog+Q9kE/Jfbilu24vEe/iW/Sj2d8EVsmiixQ1rM2RKH2n36qfxK4e8tVcaXkvuV3mU5zTZviE+NVQ== -"@esbuild/linux-mips64el@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" - integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== - "@esbuild/linux-ppc64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.15.tgz#34c5ed145b2dfc493d3e652abac8bd3baa3865a5" integrity sha512-mY6dPkIRAiFHRsGfOYZC8Q9rmr8vOBZBme0/j15zFUKM99d4ILY4WpOC7i/LqoY+RE7KaMaSfvY8CqjJtuO4xg== -"@esbuild/linux-ppc64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" - integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== - "@esbuild/linux-riscv64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.15.tgz#87bd515e837f2eb004b45f9e6a94dc5b93f22b92" integrity sha512-EcyUtxffdDtWjjwIH8sKzpDRLcVtqANooMNASO59y+xmqqRYBBM7xVLQhqF7nksIbm2yHABptoioS9RAbVMWVA== -"@esbuild/linux-riscv64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" - integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== - "@esbuild/linux-s390x@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.15.tgz#20bf7947197f199ddac2ec412029a414ceae3aa3" integrity sha512-BuS6Jx/ezxFuHxgsfvz7T4g4YlVrmCmg7UAwboeyNNg0OzNzKsIZXpr3Sb/ZREDXWgt48RO4UQRDBxJN3B9Rbg== -"@esbuild/linux-s390x@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" - integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== - "@esbuild/linux-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.15.tgz#31b93f9c94c195e852c20cd3d1914a68aa619124" integrity sha512-JsdS0EgEViwuKsw5tiJQo9UdQdUJYuB+Mf6HxtJSPN35vez1hlrNb1KajvKWF5Sa35j17+rW1ECEO9iNrIXbNg== -"@esbuild/linux-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" - integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== - "@esbuild/netbsd-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.15.tgz#8da299b3ac6875836ca8cdc1925826498069ac65" integrity sha512-R6fKjtUysYGym6uXf6qyNephVUQAGtf3n2RCsOST/neIwPqRWcnc3ogcielOd6pT+J0RDR1RGcy0ZY7d3uHVLA== -"@esbuild/netbsd-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" - integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== - "@esbuild/openbsd-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.15.tgz#04a1ec3d4e919714dba68dcf09eeb1228ad0d20c" integrity sha512-mVD4PGc26b8PI60QaPUltYKeSX0wxuy0AltC+WCTFwvKCq2+OgLP4+fFd+hZXzO2xW1HPKcytZBdjqL6FQFa7w== -"@esbuild/openbsd-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" - integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== - "@esbuild/sunos-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.15.tgz#6694ebe4e16e5cd7dab6505ff7c28f9c1c695ce5" integrity sha512-U6tYPovOkw3459t2CBwGcFYfFRjivcJJc1WC8Q3funIwX8x4fP+R6xL/QuTPNGOblbq/EUDxj9GU+dWKX0oWlQ== -"@esbuild/sunos-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" - integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== - "@esbuild/win32-arm64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.15.tgz#1f95b2564193c8d1fee8f8129a0609728171d500" integrity sha512-W+Z5F++wgKAleDABemiyXVnzXgvRFs+GVKThSI+mGgleLWluv0D7Diz4oQpgdpNzh4i2nNDzQtWbjJiqutRp6Q== -"@esbuild/win32-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" - integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== - "@esbuild/win32-ia32@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.15.tgz#c362b88b3df21916ed7bcf75c6d09c6bf3ae354a" integrity sha512-Muz/+uGgheShKGqSVS1KsHtCyEzcdOn/W/Xbh6H91Etm+wiIfwZaBn1W58MeGtfI8WA961YMHFYTthBdQs4t+w== -"@esbuild/win32-ia32@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" - integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== - "@esbuild/win32-x64@0.17.15": version "0.17.15" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.15.tgz#c2e737f3a201ebff8e2ac2b8e9f246b397ad19b8" integrity sha512-DjDa9ywLUUmjhV2Y9wUTIF+1XsmuFGvZoCmOWkli1XcNAh5t25cc7fgsCx4Zi/Uurep3TTLyDiKATgGEg61pkA== -"@esbuild/win32-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" - integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== - "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -2075,13 +1965,6 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== - dependencies: - "@sinclair/typebox" "^0.27.8" - "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -2255,7 +2138,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.15": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== @@ -3253,11 +3136,6 @@ resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - "@sindresorhus/is@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" @@ -4226,11 +4104,6 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - "@toruslabs/base-controllers@^2.2.6": version "2.5.0" resolved "https://registry.yarnpkg.com/@toruslabs/base-controllers/-/base-controllers-2.5.0.tgz#b0f93281f1be7b88f161c41d8d8a020071f4afde" @@ -4409,18 +4282,6 @@ dependencies: "@types/node" "*" -"@types/chai-subset@^1.3.3": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.3.tgz#97893814e92abd2c534de422cb377e0e0bdaac94" - integrity sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw== - dependencies: - "@types/chai" "*" - -"@types/chai@*", "@types/chai@^4.3.5": - version "4.3.6" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.6.tgz#7b489e8baf393d5dd1266fb203ddd4ea941259e6" - integrity sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw== - "@types/connect-history-api-fallback@^1.3.5": version "1.5.0" resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#9fd20b3974bdc2bcd4ac6567e2e0f6885cb2cf41" @@ -5387,49 +5248,6 @@ magic-string "^0.27.0" react-refresh "^0.14.0" -"@vitest/expect@0.34.4": - version "0.34.4" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.4.tgz#f857a83268b9e9d4e9410fe168cb206033838102" - integrity sha512-XlMKX8HyYUqB8dsY8Xxrc64J2Qs9pKMt2Z8vFTL4mBWXJsg4yoALHzJfDWi8h5nkO4Zua4zjqtapQ/IluVkSnA== - dependencies: - "@vitest/spy" "0.34.4" - "@vitest/utils" "0.34.4" - chai "^4.3.7" - -"@vitest/runner@0.34.4": - version "0.34.4" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.34.4.tgz#07543915ad22c53d99fb4bb758cb9bd5db3d7f80" - integrity sha512-hwwdB1StERqUls8oV8YcpmTIpVeJMe4WgYuDongVzixl5hlYLT2G8afhcdADeDeqCaAmZcSgLTLtqkjPQF7x+w== - dependencies: - "@vitest/utils" "0.34.4" - p-limit "^4.0.0" - pathe "^1.1.1" - -"@vitest/snapshot@0.34.4": - version "0.34.4" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.34.4.tgz#ee2c732e5978438f96c669aabb9eb66eb7f3ff46" - integrity sha512-GCsh4coc3YUSL/o+BPUo7lHQbzpdttTxL6f4q0jRx2qVGoYz/cyTRDJHbnwks6TILi6560bVWoBpYC10PuTLHw== - dependencies: - magic-string "^0.30.1" - pathe "^1.1.1" - pretty-format "^29.5.0" - -"@vitest/spy@0.34.4": - version "0.34.4" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.34.4.tgz#181ad9f32ce426ac33eb66ed35b880ee9b457035" - integrity sha512-PNU+fd7DUPgA3Ya924b1qKuQkonAW6hL7YUjkON3wmBwSTIlhOSpy04SJ0NrRsEbrXgMMj6Morh04BMf8k+w0g== - dependencies: - tinyspy "^2.1.1" - -"@vitest/utils@0.34.4": - version "0.34.4" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.4.tgz#0b6bf5fe07223ebb6ec24cd1edc0137cb301ecfd" - integrity sha512-yR2+5CHhp/K4ySY0Qtd+CAL9f5Yh1aXrKfAT42bq6CtlGPh92jIDDDSg7ydlRow1CP+dys4TrOrbELOyNInHSg== - dependencies: - diff-sequences "^29.4.3" - loupe "^2.3.6" - pretty-format "^29.5.0" - "@vue/compiler-core@3.2.45": version "3.2.45" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.45.tgz#d9311207d96f6ebd5f4660be129fb99f01ddb41b" @@ -6065,11 +5883,6 @@ JSONStream@^1.0.4, JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - abitype@0.9.8: version "0.9.8" resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.8.tgz#1f120b6b717459deafd213dfbf3a3dd1bf10ae8c" @@ -6093,11 +5906,6 @@ acorn-walk@^8.1.1, acorn-walk@^8.2.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.10.0, acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== - acorn@^8.4.1: version "8.8.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" @@ -6483,11 +6291,6 @@ assert@^2.0.0: object-is "^1.0.1" util "^0.12.0" -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - ast-types-flow@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" @@ -7212,11 +7015,6 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -cac@^6.7.14: - version "6.7.14" - resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" - integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== - cacheable-lookup@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz#3476a8215d046e5a3202a9209dd13fec1f933a27" @@ -7338,19 +7136,6 @@ cbor-sync@^1.0.4: resolved "https://registry.yarnpkg.com/cbor-sync/-/cbor-sync-1.0.4.tgz#5a11a1ab75c2a14d1af1b237fd84aa8c1593662f" integrity sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA== -chai@^4.3.7: - version "4.3.8" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.8.tgz#40c59718ad6928da6629c70496fe990b2bb5b17c" - integrity sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^4.1.2" - get-func-name "^2.0.0" - loupe "^2.3.1" - pathval "^1.1.1" - type-detect "^4.0.5" - chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -7383,11 +7168,6 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== - check-more-types@2.24.0, check-more-types@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" @@ -8164,13 +7944,6 @@ css-what@^6.0.1: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== -cssstyle@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-3.0.0.tgz#17ca9c87d26eac764bb8cfd00583cff21ce0277a" - integrity sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg== - dependencies: - rrweb-cssom "^0.6.0" - csstype@^2.5.7: version "2.6.21" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.21.tgz#2efb85b7cc55c80017c66a5ad7cbd931fda3a90e" @@ -8633,15 +8406,6 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== -data-urls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-4.0.0.tgz#333a454eca6f9a5b7b0f1013ff89074c3f522dd4" - integrity sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g== - dependencies: - abab "^2.0.6" - whatwg-mimetype "^3.0.0" - whatwg-url "^12.0.0" - date-fns@^2.16.1: version "2.29.3" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" @@ -8706,11 +8470,6 @@ decimal.js-light@^2.4.1, decimal.js-light@^2.5.0, decimal.js-light@^2.5.1: resolved "https://registry.yarnpkg.com/decimal.js-light/-/decimal.js-light-2.5.1.tgz#134fd32508f19e208f4fb2f8dac0d2626a867934" integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg== -decimal.js@^10.4.3: - version "10.4.3" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" - integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== - decode-uri-component@^0.2.0, decode-uri-component@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" @@ -8783,13 +8542,6 @@ decompress@^4.2.1: pify "^2.3.0" strip-dirs "^2.0.0" -deep-eql@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" - integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== - dependencies: - type-detect "^4.0.0" - deep-equal@^2.0.5: version "2.2.0" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.0.tgz#5caeace9c781028b9ff459f33b779346637c43e6" @@ -8973,11 +8725,6 @@ detect-node@2.1.0, detect-node@^2.0.4: resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== -diff-sequences@^29.4.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -9075,13 +8822,6 @@ domelementtype@^2.0.1, domelementtype@^2.2.0: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== -domexception@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" - integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== - dependencies: - webidl-conversions "^7.0.0" - domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" @@ -9474,34 +9214,6 @@ esbuild@^0.17.5: "@esbuild/win32-ia32" "0.17.15" "@esbuild/win32-x64" "0.17.15" -esbuild@^0.18.10: - version "0.18.20" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" - integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== - optionalDependencies: - "@esbuild/android-arm" "0.18.20" - "@esbuild/android-arm64" "0.18.20" - "@esbuild/android-x64" "0.18.20" - "@esbuild/darwin-arm64" "0.18.20" - "@esbuild/darwin-x64" "0.18.20" - "@esbuild/freebsd-arm64" "0.18.20" - "@esbuild/freebsd-x64" "0.18.20" - "@esbuild/linux-arm" "0.18.20" - "@esbuild/linux-arm64" "0.18.20" - "@esbuild/linux-ia32" "0.18.20" - "@esbuild/linux-loong64" "0.18.20" - "@esbuild/linux-mips64el" "0.18.20" - "@esbuild/linux-ppc64" "0.18.20" - "@esbuild/linux-riscv64" "0.18.20" - "@esbuild/linux-s390x" "0.18.20" - "@esbuild/linux-x64" "0.18.20" - "@esbuild/netbsd-x64" "0.18.20" - "@esbuild/openbsd-x64" "0.18.20" - "@esbuild/sunos-x64" "0.18.20" - "@esbuild/win32-arm64" "0.18.20" - "@esbuild/win32-ia32" "0.18.20" - "@esbuild/win32-x64" "0.18.20" - escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -10633,11 +10345,6 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== - get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" @@ -10926,11 +10633,6 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -globrex@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" - integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -11180,13 +10882,6 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" -html-encoding-sniffer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" - integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== - dependencies: - whatwg-encoding "^2.0.0" - html-entities@^2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" @@ -11322,15 +11017,6 @@ http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: agent-base "6" debug "4" -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== - dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" - http-proxy-middleware@^2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" @@ -11368,7 +11054,7 @@ http2-wrapper@^2.1.10: quick-lru "^5.1.1" resolve-alpn "^1.2.0" -https-proxy-agent@5, https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: +https-proxy-agent@5, https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== @@ -11410,7 +11096,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@0.6, iconv-lite@0.6.3: +iconv-lite@0.6: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -11865,11 +11551,6 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -12296,35 +11977,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== -jsdom@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-22.1.0.tgz#0fca6d1a37fbeb7f4aac93d1090d782c56b611c8" - integrity sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw== - dependencies: - abab "^2.0.6" - cssstyle "^3.0.0" - data-urls "^4.0.0" - decimal.js "^10.4.3" - domexception "^4.0.0" - form-data "^4.0.0" - html-encoding-sniffer "^3.0.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.1" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.4" - parse5 "^7.1.2" - rrweb-cssom "^0.6.0" - saxes "^6.0.0" - symbol-tree "^3.2.4" - tough-cookie "^4.1.2" - w3c-xmlserializer "^4.0.0" - webidl-conversions "^7.0.0" - whatwg-encoding "^2.0.0" - whatwg-mimetype "^3.0.0" - whatwg-url "^12.0.1" - ws "^8.13.0" - xml-name-validator "^4.0.0" - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -12407,11 +12059,6 @@ json5@^2.1.2, json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -12666,11 +12313,6 @@ local-pkg@0.4.1: resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.1.tgz#e7b0d7aa0b9c498a1110a5ac5b00ba66ef38cfff" integrity sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw== -local-pkg@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" - integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== - localStorage@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/localStorage/-/localStorage-1.0.4.tgz#57dfa28084385f81431accb8ae24b196398223f7" @@ -12866,13 +12508,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.1, loupe@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" - integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== - dependencies: - get-func-name "^2.0.0" - lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" @@ -12933,13 +12568,6 @@ magic-string@^0.27.0: dependencies: "@jridgewell/sourcemap-codec" "^1.4.13" -magic-string@^0.30.1: - version "0.30.3" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.3.tgz#403755dfd9d6b398dfa40635d52e96c5ac095b85" - integrity sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw== - dependencies: - "@jridgewell/sourcemap-codec" "^1.4.15" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -13208,16 +12836,6 @@ mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mlly@^1.2.0, mlly@^1.4.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.4.2.tgz#7cf406aa319ff6563d25da6b36610a93f2a8007e" - integrity sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg== - dependencies: - acorn "^8.10.0" - pathe "^1.1.1" - pkg-types "^1.0.3" - ufo "^1.3.0" - modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -13548,11 +13166,6 @@ numeral@^2.0.6: resolved "https://registry.yarnpkg.com/numeral/-/numeral-2.0.6.tgz#4ad080936d443c2561aed9f2197efffe25f4e506" integrity sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA== -nwsapi@^2.2.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" - integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== - nyc@15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" @@ -14099,13 +13712,6 @@ parse-url@^8.1.0: dependencies: parse-path "^7.0.0" -parse5@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -14196,16 +13802,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathe@^1.1.0, pathe@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" - integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -14382,15 +13978,6 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -pkg-types@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868" - integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A== - dependencies: - jsonc-parser "^3.2.0" - mlly "^1.2.0" - pathe "^1.1.0" - pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" @@ -14515,15 +14102,6 @@ postcss@^8.4.23: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@^8.4.27: - version "8.4.29" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.29.tgz#33bc121cf3b3688d4ddef50be869b2a54185a1dd" - integrity sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw== - dependencies: - nanoid "^3.3.6" - picocolors "^1.0.0" - source-map-js "^1.0.2" - postinstall-postinstall@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" @@ -14606,15 +14184,6 @@ pretty-format@^27.0.2: ansi-styles "^5.0.0" react-is "^17.0.1" -pretty-format@^29.5.0: - version "29.6.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.6.3.tgz#d432bb4f1ca6f9463410c3fb25a0ba88e594ace7" - integrity sha512-ZsBgjVhFAj5KeK+nHfF1305/By3lechHQSMWCTl8iHSbfOm2TN5nHEtFc/+W7fAyUeCs2n5iow72gld4gW0xDw== - dependencies: - "@jest/schemas" "^29.6.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -14798,11 +14367,6 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -punycode@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - pupa@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pupa/-/pupa-3.1.0.tgz#f15610274376bbcc70c9a3aa8b505ea23f41c579" @@ -15162,11 +14726,6 @@ react-is@^17.0.1, react-is@^17.0.2: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" @@ -15878,13 +15437,6 @@ rollup@^3.21.0: optionalDependencies: fsevents "~2.3.2" -rollup@^3.27.1: - version "3.29.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.1.tgz#ba53a179d46ac3cd79e162dca6ab70d93cd26f78" - integrity sha512-c+ebvQz0VIH4KhhCpDsI+Bik0eT8ZFEVZEYw0cGMVqIP8zc+gnwl7iXCamTw7vzv2MeuZFZfdx5JJIq+ehzDlg== - optionalDependencies: - fsevents "~2.3.2" - rpc-websockets@^7.5.0: version "7.5.0" resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" @@ -15911,11 +15463,6 @@ rpc-websockets@^7.5.1: bufferutil "^4.0.1" utf-8-validate "^5.0.2" -rrweb-cssom@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz#ed298055b97cbddcdeb278f904857629dec5e0e1" - integrity sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw== - rtcpeerconnection-shim@^1.2.15: version "1.2.15" resolved "https://registry.yarnpkg.com/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz#e7cc189a81b435324c4949aa3dfb51888684b243" @@ -16025,13 +15572,6 @@ sax@>=0.6.0: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -saxes@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" - integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== - dependencies: - xmlchars "^2.2.0" - scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" @@ -16302,11 +15842,6 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -siginfo@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" - integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== - signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -16612,11 +16147,6 @@ stack-generator@^2.0.5: dependencies: stackframe "^1.3.4" -stackback@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" - integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== - stackframe@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" @@ -16663,11 +16193,6 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -std-env@^3.3.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.4.3.tgz#326f11db518db751c83fd58574f449b7c3060910" - integrity sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q== - stdin-discarder@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz#22b3e400393a8e28ebf53f9958f3880622efde21" @@ -16871,13 +16396,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -strip-literal@^1.0.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.3.0.tgz#db3942c2ec1699e6836ad230090b84bb458e3a07" - integrity sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg== - dependencies: - acorn "^8.10.0" - strip-outer@^1.0.0, strip-outer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" @@ -16991,11 +16509,6 @@ symbol-observable@^4.0.0: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -17143,26 +16656,11 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.3: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tinybench@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.5.0.tgz#4711c99bbf6f3e986f67eb722fed9cddb3a68ba5" - integrity sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA== - tinycolor2@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== -tinypool@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" - integrity sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww== - -tinyspy@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.1.1.tgz#9e6371b00c259e5c5b301917ca18c01d40ae558c" - integrity sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w== - titleize@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" @@ -17233,7 +16731,7 @@ tough-cookie@^3.0.1: psl "^1.1.28" punycode "^2.1.1" -tough-cookie@^4.1.2, tough-cookie@^4.1.3: +tough-cookie@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== @@ -17251,13 +16749,6 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tr46@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-4.1.1.tgz#281a758dcc82aeb4fe38c7dfe4d11a395aac8469" - integrity sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw== - dependencies: - punycode "^2.3.0" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -17321,11 +16812,6 @@ ts-node@^10.8.1, ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tsconfck@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-2.1.1.tgz#9b51603d2712d1f4740fa14748ca886a2e1893e5" - integrity sha512-ZPCkJBKASZBmBUNqGHmRhdhM8pJYDdOXp4nRgj/O0JwUwsMq50lCDRQP/M5GBNAA0elPrq4gAeu4dkaVCuKWww== - tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -17384,11 +16870,6 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -17473,11 +16954,6 @@ ua-parser-js@^1.0.33: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.35.tgz#c4ef44343bc3db0a3cbefdf21822f1b1fc1ab011" integrity sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA== -ufo@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.0.tgz#c92f8ac209daff607c57bbd75029e190930a0019" - integrity sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw== - uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -17828,18 +17304,6 @@ viem@^1.6.0: isomorphic-ws "5.0.0" ws "8.13.0" -vite-node@0.34.4: - version "0.34.4" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.4.tgz#96d5b4dcc5585e3b289390f4e11ed6450978e30e" - integrity sha512-ho8HtiLc+nsmbwZMw8SlghESEE3KxJNp04F/jPUCLVvaURwt0d+r9LxEqCX5hvrrOQ0GSyxbYr5ZfRYhQ0yVKQ== - dependencies: - cac "^6.7.14" - debug "^4.3.4" - mlly "^1.4.0" - pathe "^1.1.1" - picocolors "^1.0.0" - vite "^3.0.0 || ^4.0.0" - vite-plugin-checker@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/vite-plugin-checker/-/vite-plugin-checker-0.5.6.tgz#233978091dfadef0873f0a8aacfe7fc431212b95" @@ -17875,26 +17339,6 @@ vite-plugin-svgr@^2.4.0: "@rollup/pluginutils" "^5.0.2" "@svgr/core" "^6.5.1" -vite-tsconfig-paths@^4.0.8: - version "4.2.0" - resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.0.tgz#bd2647d3eadafb65a10fc98a2ca565211f2eaf63" - integrity sha512-jGpus0eUy5qbbMVGiTxCL1iB9ZGN6Bd37VGLJU39kTDD6ZfULTTb1bcc5IeTWqWJKiWV5YihCaibeASPiGi8kw== - dependencies: - debug "^4.1.1" - globrex "^0.1.2" - tsconfck "^2.1.0" - -"vite@^3.0.0 || ^4.0.0", "vite@^3.1.0 || ^4.0.0 || ^5.0.0-0": - version "4.4.9" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.9.tgz#1402423f1a2f8d66fd8d15e351127c7236d29d3d" - integrity sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA== - dependencies: - esbuild "^0.18.10" - postcss "^8.4.27" - rollup "^3.27.1" - optionalDependencies: - fsevents "~2.3.2" - vite@^4.3.9: version "4.3.9" resolved "https://registry.yarnpkg.com/vite/-/vite-4.3.9.tgz#db896200c0b1aa13b37cdc35c9e99ee2fdd5f96d" @@ -17906,36 +17350,6 @@ vite@^4.3.9: optionalDependencies: fsevents "~2.3.2" -vitest@^0.34.4: - version "0.34.4" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.34.4.tgz#c7f40cf7ca3b590bb333b3272a98f49e85f7b958" - integrity sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw== - dependencies: - "@types/chai" "^4.3.5" - "@types/chai-subset" "^1.3.3" - "@types/node" "*" - "@vitest/expect" "0.34.4" - "@vitest/runner" "0.34.4" - "@vitest/snapshot" "0.34.4" - "@vitest/spy" "0.34.4" - "@vitest/utils" "0.34.4" - acorn "^8.9.0" - acorn-walk "^8.2.0" - cac "^6.7.14" - chai "^4.3.7" - debug "^4.3.4" - local-pkg "^0.4.3" - magic-string "^0.30.1" - pathe "^1.1.1" - picocolors "^1.0.0" - std-env "^3.3.3" - strip-literal "^1.0.1" - tinybench "^2.5.0" - tinypool "^0.7.0" - vite "^3.1.0 || ^4.0.0 || ^5.0.0-0" - vite-node "0.34.4" - why-is-node-running "^2.2.2" - vm2@^3.9.17: version "3.9.19" resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.19.tgz#be1e1d7a106122c6c492b4d51c2e8b93d3ed6a4a" @@ -17988,13 +17402,6 @@ vscode-uri@^3.0.2: resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.7.tgz#6d19fef387ee6b46c479e5fb00870e15e58c1eb8" integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA== -w3c-xmlserializer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" - integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== - dependencies: - xml-name-validator "^4.0.0" - wait-on@6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-6.0.1.tgz#16bbc4d1e4ebdd41c5b4e63a2e16dbd1f4e5601e" @@ -18069,11 +17476,6 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webidl-conversions@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" - integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== - webpack-dev-middleware@^5.3.1: version "5.3.3" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f" @@ -18151,26 +17553,6 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== -whatwg-encoding@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" - integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== - dependencies: - iconv-lite "0.6.3" - -whatwg-mimetype@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" - integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== - -whatwg-url@^12.0.0, whatwg-url@^12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-12.0.1.tgz#fd7bcc71192e7c3a2a97b9a8d6b094853ed8773c" - integrity sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ== - dependencies: - tr46 "^4.1.1" - webidl-conversions "^7.0.0" - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -18224,14 +17606,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -why-is-node-running@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e" - integrity sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA== - dependencies: - siginfo "^2.0.0" - stackback "0.0.2" - widest-line@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-4.0.1.tgz#a0fc673aaba1ea6f0a0d35b3c2795c9a9cc2ebf2" @@ -18393,11 +17767,6 @@ xhr@^2.0.1: parse-headers "^2.0.0" xtend "^4.0.0" -xml-name-validator@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" - integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== - xml-parse-from-string@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz#a9029e929d3dbcded169f3c6e28238d95a5d5a28" @@ -18416,11 +17785,6 @@ xmlbuilder@~11.0.0: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - xmlhttprequest-ssl@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67"