mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-12 09:46:46 +00:00
13 lines
422 B
TypeScript
13 lines
422 B
TypeScript
import { convertSecondsToFormattedDate, slugifyString } from './helpers';
|
|
|
|
test('it can slugify a string', () => {
|
|
expect(slugifyString('hello---world_ and then Some such-')).toEqual(
|
|
'hello-world-and-then-some-such'
|
|
);
|
|
});
|
|
|
|
test('it can keep the correct date when converting seconds to date', () => {
|
|
const dateString = convertSecondsToFormattedDate(1666325400);
|
|
expect(dateString).toEqual('2022-10-21');
|
|
});
|