chore: update jest major (#3351)

* chore: update jest major

* remove unused deps
This commit is contained in:
Juan Picado 2022-09-04 11:48:51 +02:00 committed by GitHub
parent e24eb59237
commit cbff8e4e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 624 additions and 598 deletions

View File

@ -71,7 +71,7 @@
"autocannon": "7.9.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
"babel-jest": "27.5.1",
"babel-jest": "29.0.2",
"babel-plugin-dynamic-import-node": "2.3.3",
"babel-plugin-emotion": "10.2.2",
"concurrently": "6.5.1",
@ -79,16 +79,15 @@
"cross-env": "7.0.3",
"debug": "4.3.4",
"detect-secrets": "1.0.6",
"pretty-format": "27.5.1",
"jest-diff": "27.5.1",
"jest-diff": "29.0.2",
"eslint": "8.22.0",
"fs-extra": "10.1.0",
"husky": "7.0.4",
"in-publish": "2.0.1",
"jest": "27.5.1",
"jest-environment-jsdom": "27.5.1",
"jest": "29.0.2",
"jest-environment-jsdom": "29.0.2",
"jest-environment-jsdom-global": "3.1.2",
"jest-environment-node": "27.5.1",
"jest-environment-node": "29.0.2",
"jest-junit": "12.3.0",
"kleur": "3.0.3",
"lint-staged": "11.2.6",

View File

@ -6,7 +6,7 @@ uplinks:
npmjs:
url: http://localhost:4873/
packages:
\\"@*/*\\":
"@*/*":
access: $all
publish: $all
proxy: npmjs
@ -32,7 +32,7 @@ packages:
access: $authenticated
publish: $authenticated
proxy: npmjs
\\"*\\":
"*":
access: $all
publish: $all
proxy: npmjs

View File

@ -54,12 +54,12 @@ describe('testing locking', () => {
readFile(getFilePath('package.json'), {}, (error: Error, data: string) => {
expect(error).toBeNull();
expect(data).toMatchInlineSnapshot(`
"{
\\"name\\": \\"assets\\",
\\"version\\": \\"0.0.1\\"
}
"
`);
"{
"name": "assets",
"version": "0.0.1"
}
"
`);
done();
});
});
@ -71,11 +71,11 @@ describe('testing locking', () => {
readFile(getFilePath('package.json'), options, (error: Error, data: string) => {
expect(error).toBeNull();
expect(data).toMatchInlineSnapshot(`
Object {
"name": "assets",
"version": "0.0.1",
}
`);
{
"name": "assets",
"version": "0.0.1",
}
`);
done();
});
});
@ -110,11 +110,11 @@ describe('testing locking', () => {
readFile(getFilePath('package2.json'), options, (error: Error, data: string) => {
expect(error).toBeNull();
expect(data).toMatchInlineSnapshot(`
Object {
"name": "assets",
"version": "0.0.1",
}
`);
{
"name": "assets",
"version": "0.0.1",
}
`);
removeTempFile('package2.json.lock');
done();
});

View File

@ -55,12 +55,12 @@ describe('testing locking', () => {
test('read file with no options should to be found to be read it as string', async () => {
const data = await readFileNext(getFilePath('package.json'), {});
expect(data).toMatchInlineSnapshot(`
"{
\\"name\\": \\"assets\\",
\\"version\\": \\"0.0.1\\"
}
"
`);
"{
"name": "assets",
"version": "0.0.1"
}
"
`);
});
test('read file with no options should to be found to be read it as object', async () => {
@ -69,11 +69,11 @@ describe('testing locking', () => {
};
const data = await readFileNext(getFilePath('package.json'), options);
expect(data).toMatchInlineSnapshot(`
Object {
"name": "assets",
"version": "0.0.1",
}
`);
{
"name": "assets",
"version": "0.0.1",
}
`);
});
test('read file with options (parse) should to be not found to be read it', async () => {
@ -99,16 +99,13 @@ describe('testing locking', () => {
parse: true,
lock: true,
};
await expect(
readFileNext(getFilePath('package2.json'), options)
).resolves.toMatchInlineSnapshot(
`
Object {
"name": "assets",
"version": "0.0.1",
}
`
);
await expect(readFileNext(getFilePath('package2.json'), options)).resolves
.toMatchInlineSnapshot(`
{
"name": "assets",
"version": "0.0.1",
}
`);
removeTempFile('package2.json.lock');
});

View File

@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`readme mix readmes / markdown should parse marked 1`] = `"<h1 id="mix-html-and-xss-markdown">mix html and XSS markdown</h1><p><a>Basic</a></p><p><a href="https://github.com/webpack/webpack"><img src="https://webpack.js.org/assets/icon-square-big.svg" height="200" width="200"></a></p>"`;

View File

@ -241,11 +241,7 @@ describe('readme', () => {
test('should parse marked', async () => {
const readme: string = await readReadme('mixed-html-mk');
expect(clean(parseReadme(readme) as string)).toMatchInlineSnapshot(
'"<h1 id=\\"mix-html-and-xss-markdown\\">mix html and XSS markdown</h1><p><a>Basic<' +
'/a></p><p><a href=\\"https://github.com/webpack/webpack\\"><img src=\\"https://webp' +
'ack.js.org/assets/icon-square-big.svg\\" height=\\"200\\" width=\\"200\\"></a></p>"'
);
expect(clean(parseReadme(readme) as string)).toMatchSnapshot();
});
});
});

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Author /> component should render the component in default state 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-0 {
list-style: none;
@ -560,7 +560,7 @@ Object {
`;
exports[`<Author /> component should render the component when there is no author email 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-0 {
list-style: none;

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Spinner /> component should render the component in default state 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": @keyframes animation-0 {
0% {

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Readme /> component should load the component in default state 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-0 {
background: #fff;

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<UpLinks /> component should render the component when there is no uplink 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-0 {
margin: 0;
@ -92,7 +92,7 @@ Object {
`;
exports[`<UpLinks /> component should render the component with uplinks 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-1 {
margin: 0;

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`test Developers should render the component for contributors with items 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-1 {
margin: 0;
@ -304,7 +304,7 @@ Object {
`;
exports[`test Developers should render the component for maintainers with items 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-1 {
margin: 0;
@ -607,7 +607,7 @@ Object {
`;
exports[`test Developers should render the component with no items 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": <body>
<div />

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Dist /> component should render the component in default state 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-0 {
list-style: none;
@ -640,7 +640,7 @@ Object {
`;
exports[`<Dist /> component should render the component with license as object 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-0 {
list-style: none;
@ -1305,7 +1305,7 @@ Object {
`;
exports[`<Dist /> component should render the component with license as string 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": .emotion-0 {
list-style: none;

View File

@ -1 +1,7 @@
declare module 'jest-matcher-utils';
declare module 'pretty-format' {
export type Plugin = any;
}
declare module '@jest/schemas' {
export type SnapshotFormat = any;
}

View File

@ -3,23 +3,23 @@
exports[`template custom body after 1`] = `
"
<!DOCTYPE html>
<html lang=\\"en-us\\">
<html lang="en-us">
<head>
<meta charset=\\"utf-8\\">
<base href=\\"http://domain.com\\">
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
</script>
</head>
<body class=\\"body\\">
<body class="body">
<div id=\\"root\\"></div>
<script defer=\\"defer\\" src=\\"http://domain.com/-/static/runtime.6126058572f989c948b1.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com/-/static/main.6126058572f989c948b1.js\\"></script>
<script src=\\"foo\\"/>
<div id="root"></div>
<script defer="defer" src="http://domain.com/-/static/runtime.6126058572f989c948b1.js"></script><script defer="defer" src="http://domain.com/-/static/main.6126058572f989c948b1.js"></script>
<script src="foo"/>
</body>
</html>
"
@ -28,22 +28,22 @@ exports[`template custom body after 1`] = `
exports[`template custom body before 1`] = `
"
<!DOCTYPE html>
<html lang=\\"en-us\\">
<html lang="en-us">
<head>
<meta charset=\\"utf-8\\">
<base href=\\"http://domain.com\\">
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
</script>
</head>
<body class=\\"body\\">
<script src=\\"fooBefore\\"/><script src=\\"barBefore\\"/>
<div id=\\"root\\"></div>
<script defer=\\"defer\\" src=\\"http://domain.com/-/static/runtime.6126058572f989c948b1.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com/-/static/main.6126058572f989c948b1.js\\"></script>
<body class="body">
<script src="fooBefore"/><script src="barBefore"/>
<div id="root"></div>
<script defer="defer" src="http://domain.com/-/static/runtime.6126058572f989c948b1.js"></script><script defer="defer" src="http://domain.com/-/static/main.6126058572f989c948b1.js"></script>
</body>
</html>
@ -53,22 +53,22 @@ exports[`template custom body before 1`] = `
exports[`template custom render 1`] = `
"
<!DOCTYPE html>
<html lang=\\"en-us\\">
<html lang="en-us">
<head>
<meta charset=\\"utf-8\\">
<base href=\\"http://domain.com\\">
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
</script>
</head>
<body class=\\"body\\">
<body class="body">
<div id=\\"root\\"></div>
<script defer=\\"defer\\" src=\\"http://domain.com/-/static/runtime.6126058572f989c948b1.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com/-/static/main.6126058572f989c948b1.js\\"></script>
<div id="root"></div>
<script defer="defer" src="http://domain.com/-/static/runtime.6126058572f989c948b1.js"></script><script defer="defer" src="http://domain.com/-/static/main.6126058572f989c948b1.js"></script>
</body>
</html>
@ -78,22 +78,22 @@ exports[`template custom render 1`] = `
exports[`template custom title 1`] = `
"
<!DOCTYPE html>
<html lang=\\"en-us\\">
<html lang="en-us">
<head>
<meta charset=\\"utf-8\\">
<base href=\\"http://domain.com\\">
<meta charset="utf-8">
<base href="http://domain.com">
<title>foo title</title>
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\",\\"title\\":\\"foo title\\"}
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com","title":"foo title"}
</script>
</head>
<body class=\\"body\\">
<body class="body">
<div id=\\"root\\"></div>
<script defer=\\"defer\\" src=\\"http://domain.com/-/static/runtime.6126058572f989c948b1.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com/-/static/main.6126058572f989c948b1.js\\"></script>
<div id="root"></div>
<script defer="defer" src="http://domain.com/-/static/runtime.6126058572f989c948b1.js"></script><script defer="defer" src="http://domain.com/-/static/main.6126058572f989c948b1.js"></script>
</body>
</html>
@ -103,22 +103,22 @@ exports[`template custom title 1`] = `
exports[`template custom title 2`] = `
"
<!DOCTYPE html>
<html lang=\\"en-us\\">
<html lang="en-us">
<head>
<meta charset=\\"utf-8\\">
<base href=\\"http://domain.com\\">
<meta charset="utf-8">
<base href="http://domain.com">
<title>foo title</title>
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\",\\"title\\":\\"foo title\\"}
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com","title":"foo title"}
</script>
</head>
<body class=\\"body\\">
<body class="body">
<div id=\\"root\\"></div>
<script defer=\\"defer\\" src=\\"http://domain.com/-/static/runtime.6126058572f989c948b1.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com/-/static/main.6126058572f989c948b1.js\\"></script>
<div id="root"></div>
<script defer="defer" src="http://domain.com/-/static/runtime.6126058572f989c948b1.js"></script><script defer="defer" src="http://domain.com/-/static/main.6126058572f989c948b1.js"></script>
</body>
</html>
@ -128,22 +128,22 @@ exports[`template custom title 2`] = `
exports[`template meta scripts 1`] = `
"
<!DOCTYPE html>
<html lang=\\"en-us\\">
<html lang="en-us">
<head>
<meta charset=\\"utf-8\\">
<base href=\\"http://domain.com\\">
<meta charset="utf-8">
<base href="http://domain.com">
<title></title>
<link rel=\\"icon\\" href=\\"http://domain.com-/static/favicon.ico\\"/>
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
<link rel="icon" href="http://domain.com-/static/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
window.__VERDACCIO_BASENAME_UI_OPTIONS={\\"base\\":\\"http://domain.com\\"}
window.__VERDACCIO_BASENAME_UI_OPTIONS={"base":"http://domain.com"}
</script>
<style>.someclass{font-size:10px;}</style>
</head>
<body class=\\"body\\">
<body class="body">
<div id=\\"root\\"></div>
<script defer=\\"defer\\" src=\\"http://domain.com/-/static/runtime.6126058572f989c948b1.js\\"></script><script defer=\\"defer\\" src=\\"http://domain.com/-/static/main.6126058572f989c948b1.js\\"></script>
<div id="root"></div>
<script defer="defer" src="http://domain.com/-/static/runtime.6126058572f989c948b1.js"></script><script defer="defer" src="http://domain.com/-/static/main.6126058572f989c948b1.js"></script>
</body>
</html>

View File

@ -1,15 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Utilities parseReadme should parse makrdown text to html template 1`] = `
"<h1 id=\\"project-title\\">Project Title</h1>
"<h1 id="project-title">Project Title</h1>
<p>One Paragraph of project description goes here</p>
<h2 id=\\"getting-started\\">Getting Started</h2>
<h2 id="getting-started">Getting Started</h2>
<p>These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.</p>
<h3 id=\\"prerequisites\\">Prerequisites</h3>
<h3 id="prerequisites">Prerequisites</h3>
<p>What things you need to install the software and how to install them</p>
<pre><code>Give examples
</code></pre>
<h3 id=\\"installing\\">Installing</h3>
<h3 id="installing">Installing</h3>
<p>A step by step series of examples that tell you how to get a development env running</p>
<p>Say what the step will be</p>
<pre><code>Give the example
@ -18,31 +18,31 @@ exports[`Utilities parseReadme should parse makrdown text to html template 1`] =
<pre><code>until finished
</code></pre>
<p>End with an example of getting some data out of the system or using it for a little demo</p>
<h2 id=\\"running-the-tests\\">Running the tests</h2>
<h2 id="running-the-tests">Running the tests</h2>
<p>Explain how to run the automated tests for this system</p>
<h3 id=\\"break-down-into-end-to-end-tests\\">Break down into end to end tests</h3>
<h3 id="break-down-into-end-to-end-tests">Break down into end to end tests</h3>
<p>Explain what these tests test and why</p>
<pre><code>Give an example
</code></pre>
<h3 id=\\"and-coding-style-tests\\">And coding style tests</h3>
<h3 id="and-coding-style-tests">And coding style tests</h3>
<p>Explain what these tests test and why</p>
<pre><code>Give an example
</code></pre>
<h2 id=\\"deployment\\">Deployment</h2>
<h2 id="deployment">Deployment</h2>
<p>Add additional notes about how to deploy this on a live system</p>
<h2 id=\\"built-with\\">Built With</h2>
<h2 id="built-with">Built With</h2>
<ul>
<li>The web framework used</li>
<li>Dependency Management</li>
<li>Used to generate RSS Feeds</li>
</ul>
<h2 id=\\"contributing\\">Contributing</h2>
<p>Please read <a href=\\"CONTRIBUTING.md\\">CONTRIBUTING.md</a> for details on our code of conduct, and the process for submitting pull requests to us.</p>
<h2 id=\\"versioning\\">Versioning</h2>
<p>We use <a href=\\"http://semver.org/\\">SemVer</a> for versioning. For the versions available, see the <a href=\\"https://github.com/your/project/tags\\">tags on this repository</a>.</p>
<h2 id=\\"license\\">License</h2>
<p>This project is licensed under the MIT License - see the <a href=\\"LICENSE.md\\">LICENSE.md</a> file for details</p>
<h2 id=\\"acknowledgments\\">Acknowledgments</h2>
<h2 id="contributing">Contributing</h2>
<p>Please read <a href="CONTRIBUTING.md">CONTRIBUTING.md</a> for details on our code of conduct, and the process for submitting pull requests to us.</p>
<h2 id="versioning">Versioning</h2>
<p>We use <a href="http://semver.org/">SemVer</a> for versioning. For the versions available, see the <a href="https://github.com/your/project/tags">tags on this repository</a>.</p>
<h2 id="license">License</h2>
<p>This project is licensed under the MIT License - see the <a href="LICENSE.md">LICENSE.md</a> file for details</p>
<h2 id="acknowledgments">Acknowledgments</h2>
<ul>
<li>Hat tip to anyone whose code was used</li>
<li>Inspiration</li>

File diff suppressed because it is too large Load Diff