Skip to content

Commit

Permalink
upgrade jest and fix eslint errors and tests (#916)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Khizhnyi <[email protected]>
  • Loading branch information
veksa and Alex Khizhnyi authored Dec 4, 2023
1 parent 3665a44 commit f4d3966
Show file tree
Hide file tree
Showing 91 changed files with 12,874 additions and 7,269 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pnpm run format
You can also run all four of them at the same time:

```
pnpm run check
pnpm run check
```

> **Note**: If your tests use other fela packages as depedencies, you might need to run `yarn build` (it's also part of the install step).
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"trailingComma": "es5",
"singleQuote": true,
"bracketSpacing": true,
"jsxBracketSameLine": true,
"bracketSameLine": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
Expand Down
4 changes: 3 additions & 1 deletion examples/example-inferno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
"cross-env": "^6.0.3",
"express": "^4.14.0",
"express-http-proxy": "^1.0.3",
"jest": "^26.6.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"rimraf": "^3.0.0",
"webpack": "^4.41.6",
"webpack-cli": "^4.9.2",
Expand Down
4 changes: 3 additions & 1 deletion examples/example-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
"cross-env": "^6.0.3",
"express": "^4.14.0",
"express-http-proxy": "^1.0.3",
"jest": "^26.6.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"rimraf": "^3.0.0",
"webpack": "^4.41.6",
"webpack-cli": "^4.9.2",
Expand Down
4 changes: 3 additions & 1 deletion examples/example-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"cross-env": "^6.0.3",
"express": "^4.14.0",
"express-http-proxy": "^1.0.3",
"jest": "^26.6.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"rimraf": "^3.0.0",
"webpack": "^4.41.6",
"webpack-cli": "^4.9.2",
Expand Down
4 changes: 3 additions & 1 deletion packages/fela-bindings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
"babel-jest": "^26.6.0",
"cross-env": "^6.0.3",
"fela": "^12.2.1",
"jest": "^26.6.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^17.0.2",
"rimraf": "^3.0.0"
}
Expand Down
4 changes: 3 additions & 1 deletion packages/fela-codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"fela": "^12.2.1",
"fela-preset-web": "^12.2.1",
"fela-tools": "^12.2.1",
"jest": "^26.6.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"rimraf": "^3.0.0"
}
}
4 changes: 3 additions & 1 deletion packages/fela-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
"fela": "^12.2.1",
"fela-preset-web": "^12.2.1",
"fela-tools": "^12.2.1",
"jest": "^26.6.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"js-beautify": "^1.14.0",
"jsdom": "^16.6.0",
"rimraf": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Rehydrating from DOM nodes should rehydrate the renderer cache 1`] = `
Array [
[
10,
Object {
" #id > .foo ~ barWebkitBackgroundColorred;background-color:red": Object {
{
" #id > .foo ~ barWebkitBackgroundColorred;background-color:red": {
"className": "e",
"declaration": "-webkit-background-color:red;background-color:red",
"media": "",
Expand All @@ -13,7 +13,7 @@ Array [
"support": "",
"type": "RULE",
},
"(display: grid) .foo.barcolorred": Object {
"(display: grid) .foo.barcolorred": {
"className": "h",
"declaration": "color:red",
"media": "",
Expand All @@ -22,7 +22,7 @@ Array [
"support": "(display: grid)",
"type": "RULE",
},
"(display: grid)colorblue": Object {
"(display: grid)colorblue": {
"className": "g",
"declaration": "color:blue",
"media": "",
Expand All @@ -31,7 +31,7 @@ Array [
"support": "(display: grid)",
"type": "RULE",
},
":hover> h1colorgreen": Object {
":hover> h1colorgreen": {
"className": "j",
"declaration": "color:green",
"media": "",
Expand All @@ -40,7 +40,7 @@ Array [
"support": "",
"type": "RULE",
},
":hovercolorred": Object {
":hovercolorred": {
"className": "i",
"declaration": "color:red",
"media": "",
Expand All @@ -49,7 +49,7 @@ Array [
"support": "",
"type": "RULE",
},
"WebkitBackgroundColorred;background-color:red": Object {
"WebkitBackgroundColorred;background-color:red": {
"className": "c",
"declaration": "-webkit-background-color:red;background-color:red",
"media": "",
Expand All @@ -58,7 +58,7 @@ Array [
"support": "",
"type": "RULE",
},
"WebkitFlex1;-ms-flex:1;flex:1": Object {
"WebkitFlex1;-ms-flex:1;flex:1": {
"className": "d",
"declaration": "-webkit-flex:1;-ms-flex:1;flex:1",
"media": "",
Expand All @@ -67,16 +67,16 @@ Array [
"support": "",
"type": "RULE",
},
"[alt=\\"Hello\\"]fontSize12px": Object {
"[alt=\"Hello\"]fontSize12px": {
"className": "f",
"declaration": "font-size:12px",
"media": "",
"pseudo": "[alt=\\"Hello\\"]",
"selector": ".f[alt=\\"Hello\\"]",
"pseudo": "[alt=\"Hello\"]",
"selector": ".f[alt=\"Hello\"]",
"support": "",
"type": "RULE",
},
"coloryellow": Object {
"coloryellow": {
"className": "b",
"declaration": "color:yellow",
"media": "",
Expand All @@ -90,10 +90,10 @@ Array [
`;

exports[`Rehydrating from DOM nodes should rehydrate the renderer cache 2`] = `
Array [
[
10,
Object {
" #id > .foo ~ barWebkitBackgroundColorred;background-color:red": Object {
{
" #id > .foo ~ barWebkitBackgroundColorred;background-color:red": {
"className": "e",
"declaration": "-webkit-background-color:red;background-color:red",
"media": "",
Expand All @@ -102,7 +102,7 @@ Array [
"support": "",
"type": "RULE",
},
"(display: grid) .foo.barcolorred": Object {
"(display: grid) .foo.barcolorred": {
"className": "h",
"declaration": "color:red",
"media": "",
Expand All @@ -111,7 +111,7 @@ Array [
"support": "(display: grid)",
"type": "RULE",
},
"(display: grid)colorblue": Object {
"(display: grid)colorblue": {
"className": "g",
"declaration": "color:blue",
"media": "",
Expand All @@ -120,7 +120,7 @@ Array [
"support": "(display: grid)",
"type": "RULE",
},
":hover> h1colorgreen": Object {
":hover> h1colorgreen": {
"className": "j",
"declaration": "color:green",
"media": "",
Expand All @@ -129,7 +129,7 @@ Array [
"support": "",
"type": "RULE",
},
":hovercolorred": Object {
":hovercolorred": {
"className": "i",
"declaration": "color:red",
"media": "",
Expand All @@ -138,7 +138,7 @@ Array [
"support": "",
"type": "RULE",
},
"WebkitBackgroundColorred;background-color:red": Object {
"WebkitBackgroundColorred;background-color:red": {
"className": "c",
"declaration": "-webkit-background-color:red;background-color:red",
"media": "",
Expand All @@ -147,7 +147,7 @@ Array [
"support": "",
"type": "RULE",
},
"WebkitFlex1;-ms-flex:1;flex:1": Object {
"WebkitFlex1;-ms-flex:1;flex:1": {
"className": "d",
"declaration": "-webkit-flex:1;-ms-flex:1;flex:1",
"media": "",
Expand All @@ -156,16 +156,16 @@ Array [
"support": "",
"type": "RULE",
},
"[alt=\\"Hello\\"]fontSize12px": Object {
"[alt=\"Hello\"]fontSize12px": {
"className": "f",
"declaration": "font-size:12px",
"media": "",
"pseudo": "[alt=\\"Hello\\"]",
"selector": ".parentClass .f[alt=\\"Hello\\"]",
"pseudo": "[alt=\"Hello\"]",
"selector": ".parentClass .f[alt=\"Hello\"]",
"support": "",
"type": "RULE",
},
"coloryellow": Object {
"coloryellow": {
"className": "b",
"declaration": "color:yellow",
"media": "",
Expand Down
Loading

1 comment on commit f4d3966

@vercel
Copy link

@vercel vercel bot commented on f4d3966 Dec 4, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.