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

chore: update Jest and run tests on Node.js v19 #4972

Merged
merged 5 commits into from
Oct 18, 2022
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 .github/workflows/integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
fail-fast: false
matrix:
# We run the ubuntu tests on multiple Node versions with 2 shards since they're the fastest.
node: [14, 16, 18]
node: [14, 16, 18, 19]
platform: [ubuntu-latest]
shard: ['1/2', '2/2']
# We run the rest of the tests on the minimum Node version we support with 3 shards.
Expand Down
1,088 changes: 561 additions & 527 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@yarnpkg/sdks": "workspace:^",
"clipanion": "^3.2.0-rc.10",
"eslint": "^8.2.0",
"jest": "^28.1.3",
"jest": "^29.2.1",
"tslib": "^2.4.0",
"typescript": "4.9.1-beta"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/acceptance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"devDependencies": {
"@yarnpkg/monorepo": "workspace:^",
"jest": "^28.1.3",
"jest": "^29.2.1",
"jest-json": "^2.0.0",
"pkg-tests-core": "workspace:^"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Commands add it should clean the cache when cache lives inside the project 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: ┌ Resolution step
Expand All @@ -18,7 +18,7 @@ Object {
`;

exports[`Commands add it should not clean the cache when cache lives inside the project but global cache is set 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: ┌ Resolution step
Expand All @@ -34,7 +34,7 @@ Object {
`;

exports[`Commands add it should not clean the cache when cache lives inside the project but global cache is set 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: ┌ Resolution step
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Commands config test (folder with rcfile / as json) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "{\\"key\\":\\"defaultLanguageName\\",\\"effective\\":\\"node\\",\\"description\\":\\"Default language mode that should be used when a package doesn't offer any insight\\",\\"type\\":\\"STRING\\",\\"default\\":\\"node\\"}
{\\"key\\":\\"initScope\\",\\"effective\\":\\"my-test\\",\\"source\\":\\"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc\\",\\"description\\":\\"Scope used when creating packages via the init command\\",\\"type\\":\\"STRING\\",\\"default\\":null}
{\\"key\\":\\"lastUpdateCheck\\",\\"effective\\":null,\\"description\\":\\"Last timestamp we checked whether new Yarn versions were available\\",\\"type\\":\\"STRING\\",\\"default\\":null}",
"stdout": "{"key":"defaultLanguageName","effective":"node","description":"Default language mode that should be used when a package doesn't offer any insight","type":"STRING","default":"node"}
{"key":"initScope","effective":"my-test","source":"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc","description":"Scope used when creating packages via the init command","type":"STRING","default":null}
{"key":"lastUpdateCheck","effective":null,"description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}",
}
`;

exports[`Commands config test (folder with rcfile / showing explanation) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - Default language mode that should be used when a package doesn't offer any insight - 'node'
Expand All @@ -21,7 +21,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile / showing the source) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - <default> - 'node'
Expand All @@ -31,7 +31,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile / without flags) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - 'node'
Expand All @@ -41,17 +41,17 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in ancestor parent / as json) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "{\\"key\\":\\"defaultLanguageName\\",\\"effective\\":\\"node\\",\\"description\\":\\"Default language mode that should be used when a package doesn't offer any insight\\",\\"type\\":\\"STRING\\",\\"default\\":\\"node\\"}
{\\"key\\":\\"initScope\\",\\"effective\\":\\"my-test\\",\\"source\\":\\"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc\\",\\"description\\":\\"Scope used when creating packages via the init command\\",\\"type\\":\\"STRING\\",\\"default\\":null}
{\\"key\\":\\"lastUpdateCheck\\",\\"effective\\":\\"1555784893958\\",\\"source\\":\\"WORKSPACE_ROOT/.spec-yarnrc\\",\\"description\\":\\"Last timestamp we checked whether new Yarn versions were available\\",\\"type\\":\\"STRING\\",\\"default\\":null}",
"stdout": "{"key":"defaultLanguageName","effective":"node","description":"Default language mode that should be used when a package doesn't offer any insight","type":"STRING","default":"node"}
{"key":"initScope","effective":"my-test","source":"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc","description":"Scope used when creating packages via the init command","type":"STRING","default":null}
{"key":"lastUpdateCheck","effective":"1555784893958","source":"WORKSPACE_ROOT/.spec-yarnrc","description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}",
}
`;

exports[`Commands config test (folder with rcfile and rc in ancestor parent / showing explanation) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - Default language mode that should be used when a package doesn't offer any insight - 'node'
Expand All @@ -61,7 +61,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in ancestor parent / showing the source) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - <default> - 'node'
Expand All @@ -71,7 +71,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in ancestor parent / without flags) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - 'node'
Expand All @@ -81,17 +81,17 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in home folder / as json) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "{\\"key\\":\\"defaultLanguageName\\",\\"effective\\":\\"python\\",\\"source\\":\\"HOME/.spec-yarnrc\\",\\"description\\":\\"Default language mode that should be used when a package doesn't offer any insight\\",\\"type\\":\\"STRING\\",\\"default\\":\\"node\\"}
{\\"key\\":\\"initScope\\",\\"effective\\":\\"my-test\\",\\"source\\":\\"WORKSPACE_ROOT/.spec-yarnrc\\",\\"description\\":\\"Scope used when creating packages via the init command\\",\\"type\\":\\"STRING\\",\\"default\\":null}
{\\"key\\":\\"lastUpdateCheck\\",\\"effective\\":\\"1555784893958\\",\\"source\\":\\"WORKSPACE_ROOT/.spec-yarnrc\\",\\"description\\":\\"Last timestamp we checked whether new Yarn versions were available\\",\\"type\\":\\"STRING\\",\\"default\\":null}",
"stdout": "{"key":"defaultLanguageName","effective":"python","source":"HOME/.spec-yarnrc","description":"Default language mode that should be used when a package doesn't offer any insight","type":"STRING","default":"node"}
{"key":"initScope","effective":"my-test","source":"WORKSPACE_ROOT/.spec-yarnrc","description":"Scope used when creating packages via the init command","type":"STRING","default":null}
{"key":"lastUpdateCheck","effective":"1555784893958","source":"WORKSPACE_ROOT/.spec-yarnrc","description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}",
}
`;

exports[`Commands config test (folder with rcfile and rc in home folder / showing explanation) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - Default language mode that should be used when a package doesn't offer any insight - 'python'
Expand All @@ -101,7 +101,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in home folder / showing the source) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - HOME/.spec-yarnrc - 'python'
Expand All @@ -111,7 +111,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in home folder / without flags) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - 'python'
Expand All @@ -121,17 +121,17 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in parent / as json) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "{\\"key\\":\\"defaultLanguageName\\",\\"effective\\":\\"node\\",\\"description\\":\\"Default language mode that should be used when a package doesn't offer any insight\\",\\"type\\":\\"STRING\\",\\"default\\":\\"node\\"}
{\\"key\\":\\"initScope\\",\\"effective\\":\\"my-test\\",\\"source\\":\\"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc\\",\\"description\\":\\"Scope used when creating packages via the init command\\",\\"type\\":\\"STRING\\",\\"default\\":null}
{\\"key\\":\\"lastUpdateCheck\\",\\"effective\\":\\"1555784893958\\",\\"source\\":\\"WORKSPACE_ROOT/subfolder/.spec-yarnrc\\",\\"description\\":\\"Last timestamp we checked whether new Yarn versions were available\\",\\"type\\":\\"STRING\\",\\"default\\":null}",
"stdout": "{"key":"defaultLanguageName","effective":"node","description":"Default language mode that should be used when a package doesn't offer any insight","type":"STRING","default":"node"}
{"key":"initScope","effective":"my-test","source":"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc","description":"Scope used when creating packages via the init command","type":"STRING","default":null}
{"key":"lastUpdateCheck","effective":"1555784893958","source":"WORKSPACE_ROOT/subfolder/.spec-yarnrc","description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}",
}
`;

exports[`Commands config test (folder with rcfile and rc in parent / showing explanation) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - Default language mode that should be used when a package doesn't offer any insight - 'node'
Expand All @@ -141,7 +141,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in parent / showing the source) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - <default> - 'node'
Expand All @@ -151,7 +151,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile and rc in parent / without flags) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - 'node'
Expand All @@ -161,17 +161,17 @@ Object {
`;

exports[`Commands config test (folder with rcfile without trailing newline / as json) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "{\\"key\\":\\"defaultLanguageName\\",\\"effective\\":\\"node\\",\\"description\\":\\"Default language mode that should be used when a package doesn't offer any insight\\",\\"type\\":\\"STRING\\",\\"default\\":\\"node\\"}
{\\"key\\":\\"initScope\\",\\"effective\\":\\"my-test\\",\\"source\\":\\"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc\\",\\"description\\":\\"Scope used when creating packages via the init command\\",\\"type\\":\\"STRING\\",\\"default\\":null}
{\\"key\\":\\"lastUpdateCheck\\",\\"effective\\":null,\\"description\\":\\"Last timestamp we checked whether new Yarn versions were available\\",\\"type\\":\\"STRING\\",\\"default\\":null}",
"stdout": "{"key":"defaultLanguageName","effective":"node","description":"Default language mode that should be used when a package doesn't offer any insight","type":"STRING","default":"node"}
{"key":"initScope","effective":"my-test","source":"WORKSPACE_ROOT/subfolder/subfolder/.spec-yarnrc","description":"Scope used when creating packages via the init command","type":"STRING","default":null}
{"key":"lastUpdateCheck","effective":null,"description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}",
}
`;

exports[`Commands config test (folder with rcfile without trailing newline / showing explanation) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - Default language mode that should be used when a package doesn't offer any insight - 'node'
Expand All @@ -181,7 +181,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile without trailing newline / showing the source) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - <default> - 'node'
Expand All @@ -191,7 +191,7 @@ Object {
`;

exports[`Commands config test (folder with rcfile without trailing newline / without flags) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - 'node'
Expand All @@ -201,17 +201,17 @@ Object {
`;

exports[`Commands config test (folder without rcfile in ancestry / as json) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "{\\"key\\":\\"defaultLanguageName\\",\\"effective\\":\\"node\\",\\"description\\":\\"Default language mode that should be used when a package doesn't offer any insight\\",\\"type\\":\\"STRING\\",\\"default\\":\\"node\\"}
{\\"key\\":\\"initScope\\",\\"effective\\":null,\\"description\\":\\"Scope used when creating packages via the init command\\",\\"type\\":\\"STRING\\",\\"default\\":null}
{\\"key\\":\\"lastUpdateCheck\\",\\"effective\\":null,\\"description\\":\\"Last timestamp we checked whether new Yarn versions were available\\",\\"type\\":\\"STRING\\",\\"default\\":null}",
"stdout": "{"key":"defaultLanguageName","effective":"node","description":"Default language mode that should be used when a package doesn't offer any insight","type":"STRING","default":"node"}
{"key":"initScope","effective":null,"description":"Scope used when creating packages via the init command","type":"STRING","default":null}
{"key":"lastUpdateCheck","effective":null,"description":"Last timestamp we checked whether new Yarn versions were available","type":"STRING","default":null}",
}
`;

exports[`Commands config test (folder without rcfile in ancestry / showing explanation) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - Default language mode that should be used when a package doesn't offer any insight - 'node'
Expand All @@ -221,7 +221,7 @@ Object {
`;

exports[`Commands config test (folder without rcfile in ancestry / showing the source) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - <default> - 'node'
Expand All @@ -231,7 +231,7 @@ Object {
`;

exports[`Commands config test (folder without rcfile in ancestry / without flags) 1`] = `
Object {
{
"code": 0,
"stderr": "",
"stdout": "➤ YN0000: defaultLanguageName - 'node'
Expand Down
Loading