Skip to content

Commit

Permalink
Upgrade Jest website to Docusaurus v3 (#14463)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Sep 7, 2023
1 parent 70138b8 commit 9171085
Show file tree
Hide file tree
Showing 10 changed files with 2,232 additions and 1,763 deletions.
2 changes: 1 addition & 1 deletion constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
% A list of exception to same version rule
\+ member(DependencyIdent, [
% Allow enzyme example workspace use a older version react and react-dom, because enzyme don't support react 17
'react', 'react-dom',
'react', 'react-dom', '@types/react',
% Only RN should be bumped to react 18
'react-test-renderer',
% @types/node in the root need to stay on ~14.14.45
Expand Down
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ test('does not show prototypes for object and array inline', () => {

Default: `undefined`

The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.

```js title="custom-resolver.js"
module.exports = {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@types/babel__template": "^7.0.2",
"@types/node": "~14.14.45",
"@types/which": "^3.0.0",
"@types/ws": "8.5.1",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"ansi-regex": "^5.0.1",
Expand Down Expand Up @@ -172,6 +173,7 @@
},
"resolutions": {
"@types/node": "~14.14.45",
"@types/react": "^18.2.21",
"ansi-escapes/type-fest": "^2.0.0",
"babel-jest": "workspace:^",
"jest": "workspace:^",
Expand Down
8 changes: 4 additions & 4 deletions packages/pretty-format/src/__tests__/react.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -769,11 +769,11 @@ test('supports context Consumer with a child', () => {

expect(
formatElement(
React.createElement(Consumer, null, () =>
React.createElement('div', null, 'child'),
),
React.createElement(Consumer, {
children: () => React.createElement('div', null, 'child'),
}),
),
).toBe('<Context.Consumer>\n [Function anonymous]\n</Context.Consumer>');
).toBe('<Context.Consumer>\n [Function children]\n</Context.Consumer>');
});

test('ReactElement removes undefined props', () => {
Expand Down
22 changes: 11 additions & 11 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@
]
},
"dependencies": {
"@docusaurus/core": "^2.0.0",
"@docusaurus/plugin-client-redirects": "^2.0.0",
"@docusaurus/plugin-pwa": "^2.0.0",
"@docusaurus/preset-classic": "^2.0.0",
"@docusaurus/remark-plugin-npm2yarn": "^2.0.0",
"@docusaurus/core": "0.0.0-5658",
"@docusaurus/plugin-client-redirects": "0.0.0-5658",
"@docusaurus/plugin-pwa": "0.0.0-5658",
"@docusaurus/preset-classic": "0.0.0-5658",
"@docusaurus/remark-plugin-npm2yarn": "0.0.0-5658",
"clsx": "^2.0.0",
"docusaurus-remark-plugin-tab-blocks": "^1.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"docusaurus-remark-plugin-tab-blocks": "^2.0.0-beta",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-github-btn": "^1.3.0",
"react-lite-youtube-embed": "^2.2.2",
"react-markdown": "^8.0.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@crowdin/cli": "^3.5.2",
"@docusaurus/module-type-aliases": "^2.0.0",
"@tsconfig/docusaurus": "^1.0.5",
"@types/react": "^17.0.3",
"@docusaurus/module-type-aliases": "0.0.0-5658",
"@docusaurus/tsconfig": "0.0.0-5658",
"@types/react": "^18.2.21",
"graphql": "^16.3.0",
"graphql-request": "^6.0.0",
"js-yaml": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.4/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ test('does not show prototypes for object and array inline', () => {

Default: `undefined`

The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.

```js title="custom-resolver.js"
module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.5/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ test('does not show prototypes for object and array inline', () => {

Default: `undefined`

The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.

```js title="custom-resolver.js"
module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.6/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ test('does not show prototypes for object and array inline', () => {

Default: `undefined`

The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.
The path to a module that can resolve test\<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk.

```js title="custom-resolver.js"
module.exports = {
Expand Down
Loading

0 comments on commit 9171085

Please sign in to comment.