Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed Feb 19, 2024
1 parent 62aca17 commit 6e8fd0b
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions e2e/src/cli/specs/upload.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ describe(`immich upload`, () => {
'--recursive',
]);
expect(stderr).toBe('');
expect(stdout.split('\n')).toEqual([
expect.stringContaining('Successfully uploaded 9 assets'),
]);
expect(stdout).toEqual(
expect.stringContaining('Successfully uploaded 9 assets')
);
expect(exitCode).toBe(0);

const assets = await getAllAssets({}, { headers: asKeyAuth(key) });
Expand All @@ -48,9 +48,9 @@ describe(`immich upload`, () => {
'--recursive',
'--album',
]);
expect(stdout.split('\n')).toEqual([
expect.stringContaining('Successfully uploaded 9 assets'),
]);
expect(stdout).toEqual(
expect.stringContaining('Successfully uploaded 9 assets')
);
expect(stderr).toBe('');
expect(exitCode).toBe(0);

Expand All @@ -68,9 +68,9 @@ describe(`immich upload`, () => {
`${testAssetDir}/albums/nature/`,
'--recursive',
]);
expect(response1.stdout.split('\n')).toEqual([
expect.stringContaining('Successfully uploaded 9 assets'),
]);
expect(response1.stdout).toEqual(
expect.stringContaining('Successfully uploaded 9 assets')
);
expect(response1.stderr).toBe('');
expect(response1.exitCode).toBe(0);

Expand All @@ -86,11 +86,11 @@ describe(`immich upload`, () => {
'--recursive',
'--album',
]);
expect(response2.stdout.split('\n')).toEqual([
expect(response2.stdout).toEqual(
expect.stringContaining(
'All assets were already uploaded, nothing to do.'
),
]);
)
);
expect(response2.stderr).toBe('');
expect(response2.exitCode).toBe(0);

Expand All @@ -111,9 +111,9 @@ describe(`immich upload`, () => {
'--recursive',
'--album-name=e2e',
]);
expect(stdout.split('\n')).toEqual([
expect.stringContaining('Successfully uploaded 9 assets'),
]);
expect(stdout).toEqual(
expect.stringContaining('Successfully uploaded 9 assets')
);
expect(stderr).toBe('');
expect(exitCode).toBe(0);

Expand Down Expand Up @@ -147,9 +147,9 @@ describe(`immich upload`, () => {
await rm(`/tmp/albums/nature`, { recursive: true });
expect(files).toEqual([]);

expect(stdout.split('\n')).toEqual([
expect.stringContaining('Successfully uploaded 9 assets'),
]);
expect(stdout).toEqual(
expect.stringContaining('Successfully uploaded 9 assets')
);
expect(stderr).toBe('');
expect(exitCode).toBe(0);

Expand Down

0 comments on commit 6e8fd0b

Please sign in to comment.