Skip to content

Commit 5475328

Browse files
authored
test: polish (#1280)
1 parent 9b31705 commit 5475328

File tree

4 files changed

+2
-19
lines changed

4 files changed

+2
-19
lines changed

packages/pinia/__tests__/actions.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,6 @@ describe('Actions', () => {
142142
expect(() => store.throws()).toThrowError('fail')
143143
})
144144

145-
it('throws errors', () => {
146-
const store = useStore()
147-
expect(() => store.throws()).toThrowError('fail')
148-
})
149-
150145
it('throws async errors', async () => {
151146
const store = useStore()
152147
expect.assertions(1)
@@ -175,7 +170,7 @@ describe('Actions', () => {
175170
{
176171
$id: store.$id,
177172
simple,
178-
// otherwise it would faial
173+
// otherwise it would fail
179174
toggle() {},
180175
}.simple()
181176
).toBe('simple')

packages/pinia/__tests__/getters.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('Getters', () => {
7878
setActivePinia(pinia1)
7979
const aStore = useA()
8080

81-
// simulate a different applications
81+
// simulate a different application
8282
setActivePinia(pinia2)
8383
const bStore = useB()
8484
bStore.b = 'c'

packages/pinia/__tests__/mapHelpers.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ describe('Map Helpers', () => {
5252
})
5353

5454
const wrapper = mount(Component, { global: { plugins: [pinia] } })
55-
// const store = useStore()
5655
// @ts-expect-error: by default this shouldn't exist
5756
expect(wrapper.vm.main).toBeDefined()
5857
expect(wrapper.vm.mainStore).not.toBeDefined()

packages/pinia/__tests__/state.spec.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,6 @@ describe('State', () => {
9595
expect(pinia.state.value.main.nested.n).toBe(3)
9696
})
9797

98-
// it('watch', () => {
99-
// setActivePinia(createPinia())
100-
// defineStore({
101-
// id: 'main',
102-
// state: () => ({
103-
// name: 'Eduardo',
104-
// counter: 0,
105-
// }),
106-
// })()
107-
// })
108-
10998
it('state can be watched', async () => {
11099
const store = useStore()
111100
const spy = jest.fn()

0 commit comments

Comments
 (0)