diff --git a/test/unit/codec.test.ts b/test/unit/codec.test.ts index 7451715f..e0052210 100644 --- a/test/unit/codec.test.ts +++ b/test/unit/codec.test.ts @@ -1,25 +1,23 @@ import { mwsDate } from '../../src/parsing' -describe('sellers', () => { - describe('mwsDate', () => { - /** - * Adding this test because for some reason git actions fails on dates - * https://github.com/ScaleLeap/amazon-mws-api-sdk/pull/113/checks?check_run_id=830331398 - */ - it('parses dates correctly', async () => { - expect.assertions(1) +describe('mwsDate', () => { + /** + * Adding this test because for some reason git actions fails on dates + * https://github.com/ScaleLeap/amazon-mws-api-sdk/pull/113/checks?check_run_id=830331398 + */ + it('parses dates correctly', async () => { + expect.assertions(1) - const shipDate = '10/16/2018 07:41:12' - const fromSnapshot = '2018-10-15T23:41:12.000Z' // this is the output of the snapshot - // const notFromSnapshot = '2018-10-16T07:41:12.000Z' // the output from the test running in git - const output = mwsDate.decode(shipDate).caseOf({ - Right: (x) => x.toISOString(), - Left: () => { - console.log() - }, - }) - - expect(output).toStrictEqual(fromSnapshot) + const shipDate = '10/16/2018 07:41:12' + const fromSnapshot = '2018-10-15T23:41:12.000Z' // this is the output of the snapshot + // const notFromSnapshot = '2018-10-16T07:41:12.000Z' // the output from the test running in git + const output = mwsDate.decode(shipDate).caseOf({ + Right: (x) => x.toISOString(), + Left: () => { + console.log() + }, }) + + expect(output).toStrictEqual(fromSnapshot) }) })