Update unit tests.
This commit is contained in:
parent
1f8b7d940d
commit
99ae8bcb10
1 changed files with 6 additions and 2 deletions
|
|
@ -547,28 +547,32 @@ describe("Actions", () => {
|
|||
// Arrange
|
||||
const context = state;
|
||||
const commit = jest.fn();
|
||||
const dispatch = jest.fn();
|
||||
|
||||
context.commit = commit;
|
||||
context.dispatch = dispatch;
|
||||
|
||||
// Act
|
||||
await actions.resetDamageAndDependencies(context);
|
||||
|
||||
expect(commit).toBeCalledWith(storeMutations.RESET_DAMAGE_STATE);
|
||||
expect(commit).toBeCalledWith(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
expect(dispatch).toBeCalledWith(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
});
|
||||
|
||||
it("resetRegistrationAndDependencies action", async () => {
|
||||
// Arrange
|
||||
const context = state;
|
||||
const commit = jest.fn();
|
||||
const dispatch = jest.fn();
|
||||
|
||||
context.commit = commit;
|
||||
context.dispatch = dispatch;
|
||||
|
||||
// Act
|
||||
await actions.resetRegistrationAndDependencies(context);
|
||||
|
||||
expect(commit).toBeCalledWith(storeMutations.RESET_REGISTRATION_STATE);
|
||||
expect(commit).toBeCalledWith(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
expect(dispatch).toBeCalledWith(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
});
|
||||
|
||||
it("resetPartsAndDependencies action", async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue