Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Nov 8, 2023
1 parent 3ce5a15 commit 8b7d9e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/state/test/provider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest';
import { render } from '@solidjs/testing-library';
import { provideState, StateProvider } from '../src/solid';
import { defineStore } from '~/solid/store';
import { StateBuilderError } from '~/error';

describe('provider', () => {
const counter = defineStore(() => ({ count: 0 })).extend((ctx) => ({
Expand Down Expand Up @@ -55,7 +56,7 @@ describe('provider', () => {

it('should throw error', async () => {
expect(() => render(() => <App />)).toThrowError(
new Error('No <StateProvider> found in component tree'),
new StateBuilderError('No <StateProvider> found in component tree'),
);
});
});

0 comments on commit 8b7d9e7

Please sign in to comment.