Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump jest-extended and pin node to 18.13 #5013

Merged
merged 5 commits into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18.13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No support for ranges

This is mainly for CI

19 changes: 12 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"engine-strict": true,
"engines": {
"node": "18.x",
"node": ">=18.13 <19",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The range is supported here

"npm": "8.x"
},
"author": "Todd Schiller",
Expand Down Expand Up @@ -237,7 +237,7 @@
"identity-obj-proxy": "^3.0.0",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-extended": "^3.1.0",
"jest-extended": "^3.2.3",
"jest-webextension-mock": "^3.8.7",
"jsdom": "^21.0.0",
"jsdom-testing-mocks": "^1.6.0",
Expand Down
8 changes: 4 additions & 4 deletions src/__snapshots__/Storyshots.test.js.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions src/blocks/transformers/__snapshots__/parseDate.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 2 additions & 30 deletions src/blocks/transformers/parseDate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,7 @@ describe("ParseDate block", () => {
runRendererPipeline: neverPromise,
});

expect(result).toEqual({
utc: {
iso8601: "2021-12-10T03:00:00.000Z",
date: "12/10/2021",
time: "3:00:00 AM",
humanReadable: "Fri, 10 Dec 2021 03:00:00 GMT",
epochMillis: 1_639_105_200_000,
},
local: {
iso8601: "2021-12-09T22:00:00.000-05:00",
date: "12/9/2021",
time: "10:00:00 PM",
humanReadable: "12/9/2021, 10:00:00 PM",
},
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual snapshots 🥲

expect(result).toMatchSnapshot();

const validation = await validateOutput(brick.outputSchema, result);
expect(validation.valid).toBeTruthy();
Expand Down Expand Up @@ -128,21 +114,7 @@ describe("ParseDate block", () => {
runRendererPipeline: neverPromise,
});

expect(result).toEqual({
utc: {
iso8601: "2021-12-09T03:00:00.000Z",
date: "12/9/2021",
time: "3:00:00 AM",
humanReadable: "Thu, 09 Dec 2021 03:00:00 GMT",
epochMillis: 1_639_018_800_000,
},
local: {
iso8601: "2021-12-08T22:00:00.000-05:00",
date: "12/8/2021",
time: "10:00:00 PM",
humanReadable: "12/8/2021, 10:00:00 PM",
},
});
expect(result).toMatchSnapshot();

const validation = await validateOutput(brick.outputSchema, result);
expect(validation.valid).toBeTruthy();
Expand Down