This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96613d6
commit 16ba997
Showing
1 changed file
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
}) | ||
}) |