Update snapshots

Signed-off-by: Erik Engervall <erik.engervall@gmail.com>
This commit is contained in:
Erik Engervall
2021-10-06 16:37:30 +02:00
parent 95a25a3f27
commit a6f86fae1a
2 changed files with 21 additions and 25 deletions
@@ -37,6 +37,7 @@ describe('GitReleaseClient', () => {
"createRef": [Function],
"createRelease": [Function],
"createTagObject": [Function],
"deleteRef": [Function],
"getAllReleases": [Function],
"getAllTags": [Function],
"getBranch": [Function],
@@ -72,7 +72,16 @@ describe('useResponseSteps', () => {
Array [
Object {
"icon": "failure",
"message": "Something went wrong 🔥",
"message": <b>
Something went wrong
<span
aria-label="fire"
role="img"
>
🔥
</span>
</b>,
"secondaryMessage": "Error message: :(",
},
]
@@ -96,7 +105,16 @@ describe('useResponseSteps', () => {
Array [
Object {
"icon": "failure",
"message": "Something went wrong 🔥",
"message": <b>
Something went wrong
<span
aria-label="fire"
role="img"
>
🔥
</span>
</b>,
"secondaryMessage": "Error message: unknown",
},
]
@@ -105,29 +123,6 @@ describe('useResponseSteps', () => {
});
describe('abortIfError', () => {
it('should throw if Error and add a failure step', async () => {
const { result } = renderHook(() => useResponseSteps());
expect(result.current.responseSteps).toMatchInlineSnapshot(`Array []`);
act(() => {
try {
result.current.abortIfError(new Error('Das kaboom'));
} catch (error) {
//
}
});
expect(result.current.responseSteps).toMatchInlineSnapshot(`
Array [
Object {
"icon": "failure",
"message": "Skipped due to error in previous step",
},
]
`);
});
it('should do nothing if not Error', async () => {
const { result } = renderHook(() => useResponseSteps());