Skip to content

Commit

Permalink
updates snapshots for new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitropoulos committed Sep 17, 2024
1 parent 44463ac commit adc2abd
Show file tree
Hide file tree
Showing 14 changed files with 307 additions and 307 deletions.
18 changes: 9 additions & 9 deletions packages/turbo-codemod/__tests__/add-package-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@ describe("add-package-manager-2", () => {
"Encountered an error while transforming files"
);
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
"action": "error",
"additions": 1,
"deletions": 0,
"error": [Error: could not write file],
},
}
`);
{
"package.json": {
"action": "error",
"additions": 1,
"deletions": 0,
"error": [Error: could not write file],
},
}
`);

mockWriteJsonSync.mockRestore();
mockGetAvailablePackageManagers.mockRestore();
Expand Down
14 changes: 7 additions & 7 deletions packages/turbo-codemod/__tests__/add-package-names.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ describe("add-package-names", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"packages/ui/package.json": Object {
{
"packages/ui/package.json": {
"action": "modified",
"additions": 1,
"deletions": 0,
},
"packages/utils/package.json": Object {
"packages/utils/package.json": {
"action": "modified",
"additions": 1,
"deletions": 0,
Expand Down Expand Up @@ -64,8 +64,8 @@ describe("add-package-names", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"packages/utils/package.json": Object {
{
"packages/utils/package.json": {
"action": "modified",
"additions": 1,
"deletions": 1,
Expand Down Expand Up @@ -100,7 +100,7 @@ describe("add-package-names", () => {

// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`Object {}`);
expect(result.changes).toMatchInlineSnapshot(`{}`);

// validate unique names
const names = new Set();
Expand Down Expand Up @@ -129,7 +129,7 @@ describe("add-package-names", () => {

// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`Object {}`);
expect(result.changes).toMatchInlineSnapshot(`{}`);

// validate unique names
const names = new Set();
Expand Down
4 changes: 2 additions & 2 deletions packages/turbo-codemod/__tests__/clean-globs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ describe("clean-globs", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"turbo.json": Object {
{
"turbo.json": {
"action": "modified",
"additions": 6,
"deletions": 6,
Expand Down
60 changes: 30 additions & 30 deletions packages/turbo-codemod/__tests__/create-turbo-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "modified",
"additions": 0,
"deletions": 1,
},
"turbo.json": Object {
"turbo.json": {
"action": "modified",
"additions": 1,
"deletions": 0,
Expand Down Expand Up @@ -67,13 +67,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "modified",
"additions": 0,
"deletions": 1,
},
"turbo.json": Object {
"turbo.json": {
"action": "modified",
"additions": 1,
"deletions": 0,
Expand All @@ -89,13 +89,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(repeatResult.fatalError).toBeUndefined();
expect(repeatResult.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
},
"turbo.json": Object {
"turbo.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
Expand Down Expand Up @@ -126,13 +126,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "skipped",
"additions": 0,
"deletions": 1,
},
"turbo.json": Object {
"turbo.json": {
"action": "skipped",
"additions": 1,
"deletions": 0,
Expand Down Expand Up @@ -163,13 +163,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "modified",
"additions": 0,
"deletions": 1,
},
"turbo.json": Object {
"turbo.json": {
"action": "modified",
"additions": 1,
"deletions": 0,
Expand Down Expand Up @@ -200,13 +200,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "skipped",
"additions": 0,
"deletions": 1,
},
"turbo.json": Object {
"turbo.json": {
"action": "skipped",
"additions": 1,
"deletions": 0,
Expand Down Expand Up @@ -241,13 +241,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
},
"turbo.json": Object {
"turbo.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
Expand Down Expand Up @@ -305,13 +305,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
},
"turbo.json": Object {
"turbo.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
Expand Down Expand Up @@ -348,13 +348,13 @@ describe("create-turbo-config", () => {
// result should be correct
expect(result.fatalError?.message).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
},
"turbo.json": Object {
"turbo.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
Expand Down Expand Up @@ -395,14 +395,14 @@ describe("create-turbo-config", () => {
"Encountered an error while transforming files"
);
expect(result.changes).toMatchInlineSnapshot(`
Object {
"package.json": Object {
{
"package.json": {
"action": "error",
"additions": 0,
"deletions": 1,
"error": [Error: could not write file],
},
"turbo.json": Object {
"turbo.json": {
"action": "error",
"additions": 1,
"deletions": 0,
Expand Down
34 changes: 17 additions & 17 deletions packages/turbo-codemod/__tests__/migrate-dot-env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe("migrate-dot-env", () => {

expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"turbo.json": Object {
{
"turbo.json": {
"action": "modified",
"additions": 3,
"deletions": 3,
Expand Down Expand Up @@ -100,23 +100,23 @@ describe("migrate-dot-env", () => {

expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"apps/docs/turbo.json": Object {
{
"apps/docs/turbo.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
},
"apps/web/turbo.json": Object {
"apps/web/turbo.json": {
"action": "modified",
"additions": 1,
"deletions": 0,
},
"packages/ui/turbo.json": Object {
"packages/ui/turbo.json": {
"action": "modified",
"additions": 1,
"deletions": 1,
},
"turbo.json": Object {
"turbo.json": {
"action": "modified",
"additions": 2,
"deletions": 2,
Expand Down Expand Up @@ -144,8 +144,8 @@ describe("migrate-dot-env", () => {

expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"turbo.json": Object {
{
"turbo.json": {
"action": "skipped",
"additions": 3,
"deletions": 3,
Expand Down Expand Up @@ -182,8 +182,8 @@ describe("migrate-dot-env", () => {

expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"turbo.json": Object {
{
"turbo.json": {
"action": "modified",
"additions": 3,
"deletions": 3,
Expand Down Expand Up @@ -211,8 +211,8 @@ describe("migrate-dot-env", () => {

expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"turbo.json": Object {
{
"turbo.json": {
"action": "skipped",
"additions": 3,
"deletions": 3,
Expand Down Expand Up @@ -241,8 +241,8 @@ describe("migrate-dot-env", () => {

expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"turbo.json": Object {
{
"turbo.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
Expand Down Expand Up @@ -280,8 +280,8 @@ describe("migrate-dot-env", () => {

expect(result.fatalError).toBeUndefined();
expect(result.changes).toMatchInlineSnapshot(`
Object {
"turbo.json": Object {
{
"turbo.json": {
"action": "unchanged",
"additions": 0,
"deletions": 0,
Expand Down
Loading

0 comments on commit adc2abd

Please sign in to comment.