mirror of
https://github.com/status-im/status-web.git
synced 2026-08-31 06:11:10 +00:00
* feat: migrate community dapp * fix: change server protocol from https to http in webpack config * fix: update build script in package.json and add output directory to turbo.json * fix: update CI workflow to initialize git submodules recursively and add Foundry installation step * chore: change from community to community-dapp * feat: add global type declarations for wallet and API integration * fix: correct syntax for not-first-child selector in Card component * fix(wallet): use type-safe globalThis cast instead of direct property assignment * fix(community-dapp): fix eslint FlatCompat config and include test files in tsconfig * fix(ci): fix forge test args and disable broken community-dapp tests * fix(community-dapp): resolve @libp2p/interface to v2.10.4 for webpack build * fix: add @libp2p/interface as missing dependency for @waku packages via packageExtensions * fix: address PR review feedback * fix(wallet): restore type-safe globalThis cast for CI build * fix: commit ABI artifacts and add vercel.json for SPA routing * fix(community-dapp): add 404.html for SPA routing on Vercel * fix(community-dapp): simplify vercel.json to rewrites only * fix(community-dapp): update vercel.json with build and output configurations * fix: add Foundry dependencies to .gitignore
24 lines
651 B
TypeScript
24 lines
651 B
TypeScript
import { formatTimeLeft } from '../src/helpers/fomatTimeLeft'
|
|
import { expect } from 'chai'
|
|
|
|
describe('formatTimeLeft', () => {
|
|
it('seconds left', () => {
|
|
expect(formatTimeLeft(10)).to.eq('10 seconds left')
|
|
})
|
|
it('hours left', () => {
|
|
expect(formatTimeLeft(8000)).to.eq('2 hours left')
|
|
})
|
|
it('days left', () => {
|
|
expect(formatTimeLeft(172800)).to.eq('2 days left')
|
|
})
|
|
it('seconds ago', () => {
|
|
expect(formatTimeLeft(-10)).to.eq('Vote ended')
|
|
})
|
|
it('hours ago', () => {
|
|
expect(formatTimeLeft(-8000)).to.eq('Vote ended')
|
|
})
|
|
it('days ago', () => {
|
|
expect(formatTimeLeft(-172800)).to.eq('Vote ended')
|
|
})
|
|
})
|