Files
Jinho Jang 89df4a5048 Migrate community curation dapp into status-web monorepo (#1077)
* 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
2026-03-31 23:27:42 +09:00

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')
})
})