commit | author | age
|
c89de6
|
1 |
import store from "@/store"; |
D |
2 |
|
|
3 |
describe("Initial state tests", () => { |
|
4 |
it("should have no todos by default", () => { |
|
5 |
expect(store.state.todos.length).toBe(0); |
|
6 |
}); |
|
7 |
it("should have no newTodo by default", () => { |
|
8 |
expect(store.state.newTodo).toBe(""); |
|
9 |
}); |
|
10 |
it("should have loading true by default", () => { |
|
11 |
expect(store.state.loading).toBe(true); |
|
12 |
}); |
|
13 |
}); |
|
14 |
|
|
15 |
describe("state getters", () => { |
|
16 |
it("get newTodo should be empty string", () => { |
|
17 |
expect(store.getters.newTodo).toBe(""); |
|
18 |
}); |
|
19 |
it("should have empty todos on get", () => { |
|
20 |
expect(store.getters.todos.length).toBe(0); |
|
21 |
}); |
|
22 |
}); |