This converts all pure tests to Jest. This was done by first running `npx jest-codemods` with the Mocha transformation, then manually fixing any places where it hadn't automatically converted the correct thing or had missed things (mostly Sinon). This also sets up VSCode correctly for running Jest.
9 lines
286 B
TypeScript
9 lines
286 B
TypeScript
import { formatDate } from "../../src/pure/date";
|
|
|
|
describe("Date", () => {
|
|
it("should return a formatted date", () => {
|
|
expect(formatDate(new Date(1663326904000))).toBe("Sep 16, 11:15 AM");
|
|
expect(formatDate(new Date(1631783704000))).toBe("Sep 16, 2021, 9:15 AM");
|
|
});
|
|
});
|