ui changes and cs prices
All checks were successful
Test and deploy staging / staging (push) Successful in 11m52s
All checks were successful
Test and deploy staging / staging (push) Successful in 11m52s
This commit is contained in:
12
src/lib/cs-prices/steam.test.ts
Normal file
12
src/lib/cs-prices/steam.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { steamDate } from './steam';
|
||||
|
||||
describe('Steam market history dates', () => {
|
||||
it('keeps hourly timestamps and older daily timestamps in UTC', () => {
|
||||
expect(steamDate('Sep 24 2024 01: +0')).toBe('2024-09-24T01:00:00.000Z');
|
||||
expect(steamDate('Jan 08 2016')).toBe('2016-01-08T00:00:00.000Z');
|
||||
});
|
||||
it('rejects an unknown format', () => {
|
||||
expect(() => steamDate('not a date')).toThrow('Unknown Steam date');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user