1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/tests/unit/utils/index.test.ts

21 lines
543 B
TypeScript
Raw Normal View History

import { toStringNoMS, updateQueryStringParameter } from '../../../src/utils'
2020-05-07 08:03:30 +02:00
describe('updateQueryStringParameter()', () => {
it('transform a URI', () => {
const newUri = updateQueryStringParameter(
'/hello?param=hello',
'param',
'hello2'
)
expect(newUri).toContain('param=hello2')
})
})
describe('toStringNoMS()', () => {
it('returns a ISO string from a Date object without the milliseconds', () => {
expect(toStringNoMS(new Date(1583956486719))).toEqual(
'2020-03-11T19:54:46Z'
)
})
})