From 620d33fea55dca2a4ed2c9a71a3ca5933f0b94e1 Mon Sep 17 00:00:00 2001 From: Dexter Edwards Date: Tue, 30 Aug 2022 12:15:45 +0100 Subject: [PATCH] chore: make test names consistent (#1183) --- apps/token/src/lib/decimals.test.ts | 4 ++-- apps/token/src/routes/claim/lib/is-restricted.test.ts | 10 +++++----- .../token-details/token-details-circulating.test.ts | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/token/src/lib/decimals.test.ts b/apps/token/src/lib/decimals.test.ts index 7c2dfad72..92f16f5d7 100644 --- a/apps/token/src/lib/decimals.test.ts +++ b/apps/token/src/lib/decimals.test.ts @@ -1,11 +1,11 @@ import { BigNumber } from './bignumber'; import { addDecimal, removeDecimal } from './decimals'; -test('Do not pad numbers with 0s when the number length is less than the specified DPs', () => { +it('Do not pad numbers with 0s when the number length is less than the specified DPs', () => { expect(addDecimal(new BigNumber(10000), 10)).toEqual('0.000001'); }); -test('Handles large numbers correctly', () => { +it('Handles large numbers correctly', () => { const claimCode = new BigNumber('20000000000000000000000000'); const decimals = 18; diff --git a/apps/token/src/routes/claim/lib/is-restricted.test.ts b/apps/token/src/routes/claim/lib/is-restricted.test.ts index 65db25658..98a98d590 100644 --- a/apps/token/src/routes/claim/lib/is-restricted.test.ts +++ b/apps/token/src/routes/claim/lib/is-restricted.test.ts @@ -4,26 +4,26 @@ afterEach(() => { document.cookie = ''; }); -test('Returns false on no cookie', () => { +it('Returns false on no cookie', () => { expect(isRestricted()).toEqual(false); }); -test('Returns false on no restricted cookie', () => { +it('Returns false on no restricted cookie', () => { document.cookie = 'one=a;two=b'; expect(isRestricted()).toEqual(false); }); -test('Returns true if a cookie called restricted is set but false', () => { +it('Returns true if a cookie called restricted is set but false', () => { document.cookie = 'restricted=false'; expect(isRestricted()).toEqual(false); }); -test('Returns true if a cookie called restricted is set and true', () => { +it('Returns true if a cookie called restricted is set and true', () => { document.cookie = 'restricted=true'; expect(isRestricted()).toEqual(true); }); -test('Handle weird data', () => { +it('Handle weird data', () => { document.cookie = ';🍪;;;;;🍪=🍪;;;;;;;;;🍪'; expect(isRestricted()).toEqual(true); }); diff --git a/apps/token/src/routes/home/token-details/token-details-circulating.test.ts b/apps/token/src/routes/home/token-details/token-details-circulating.test.ts index 7184c4dae..b8cc3ab96 100644 --- a/apps/token/src/routes/home/token-details/token-details-circulating.test.ts +++ b/apps/token/src/routes/home/token-details/token-details-circulating.test.ts @@ -2,7 +2,7 @@ import { BigNumber } from '../../../lib/bignumber'; import { sumCirculatingTokens } from './token-details-circulating'; import type { Tranche } from '@vegaprotocol/smart-contracts'; -test('It sums some easy tranches correctly', () => { +it('It sums some easy tranches correctly', () => { const tranches: Partial[] = [ { total_added: new BigNumber('100'), locked_amount: new BigNumber(0) }, { total_added: new BigNumber('100'), locked_amount: new BigNumber(0) }, @@ -13,7 +13,7 @@ test('It sums some easy tranches correctly', () => { expect(result.toString()).toEqual('300'); }); -test('It sums some longer tranches correctly', () => { +it('It sums some longer tranches correctly', () => { const tranches: Partial[] = [ { total_added: new BigNumber('10000000000'), @@ -27,7 +27,7 @@ test('It sums some longer tranches correctly', () => { expect(result.toString()).toEqual('10000000000'); }); -test('Handles null tranche array', () => { +it('Handles null tranche array', () => { const tranches = null; const result = sumCirculatingTokens(tranches as unknown as Tranche[]);