-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
test/snapshots/test-update/__snapshots__/retry.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`file repeats 1`] = `"foo"`; | ||
|
||
exports[`file repeats many 1`] = `"foo"`; | ||
|
||
exports[`file repeats many 2`] = `"bar"`; | ||
|
||
exports[`file retry 1`] = `"foo"`; | ||
|
||
exports[`file retry many 1`] = `"foo"`; | ||
|
||
exports[`file retry many 2`] = `"bar"`; | ||
|
||
exports[`file retry partial 1`] = `"foo"`; | ||
|
||
exports[`file retry partial 2`] = `"bar"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { expect, test } from 'vitest' | ||
|
||
test('inline repeats', { repeats: 1 }, () => { | ||
expect('foo').toMatchInlineSnapshot(`"foo"`) | ||
}) | ||
|
||
test('inline retry', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchInlineSnapshot(`"foo"`) | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
}) | ||
|
||
test('file repeats', { repeats: 1 }, () => { | ||
expect('foo').toMatchSnapshot() | ||
}) | ||
|
||
test('file retry', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchSnapshot() | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
}) | ||
|
||
test('file repeats many', { repeats: 1 }, () => { | ||
expect('foo').toMatchSnapshot() | ||
expect('bar').toMatchSnapshot() | ||
}) | ||
|
||
test('file retry many', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchSnapshot() | ||
expect('bar').toMatchSnapshot() | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
}) | ||
|
||
test('file retry partial', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchSnapshot() | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
expect('bar').toMatchSnapshot() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { expect, test } from 'vitest' | ||
|
||
test('inline repeats', { repeats: 1 }, () => { | ||
expect('foo').toMatchInlineSnapshot() | ||
}) | ||
|
||
test('inline retry', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchInlineSnapshot() | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
}) | ||
|
||
test('file repeats', { repeats: 1 }, () => { | ||
expect('foo').toMatchSnapshot() | ||
}) | ||
|
||
test('file retry', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchSnapshot() | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
}) | ||
|
||
test('file repeats many', { repeats: 1 }, () => { | ||
expect('foo').toMatchSnapshot() | ||
expect('bar').toMatchSnapshot() | ||
}) | ||
|
||
test('file retry many', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchSnapshot() | ||
expect('bar').toMatchSnapshot() | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
}) | ||
|
||
test('file retry partial', { retry: 1 }, (ctx) => { | ||
expect('foo').toMatchSnapshot() | ||
if (ctx.task.result?.retryCount === 0) { | ||
throw new Error('boom') | ||
} | ||
expect('bar').toMatchSnapshot() | ||
}) |