Skip to content

Commit 24ef94c

Browse files
committed
export test utils
1 parent b9132b9 commit 24ef94c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/guide/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ First we have to import the mock method from the test utils via
1111

1212
```js
1313
import VuexORMGraphQL from '@vuex-orm/plugin-graphql';
14-
import { setupTestUtils, mock } from '@vuex-orm/plugin-graphql/lib/test-utils';
14+
import { setupTestUtils, mock } from '@vuex-orm/plugin-graphql';
1515
```
1616

1717
After that we have to setup the test utils, this is very easy, just pass the imported VuexORMGraphQL

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
import VuexORMGraphQLPlugin from './plugin';
1+
import VuexORMGraphQLPlugin from "./plugin";
22
export default VuexORMGraphQLPlugin;
3+
4+
export { setupTestUtils, mock, clearORMStore, Mock, MockOptions, ReturnValue } from "./test-utils";

test/integration/test-utils.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { setupMockData, User, Post } from "../support/mock-data";
2-
import { clearORMStore, mock, setupTestUtils } from "../../src/test-utils";
2+
import { clearORMStore, mock } from "../../src";
33
import { recordGraphQLRequest } from "../support/helpers";
4-
import VuexORMGraphQLPlugin from "../../src";
54

65
// @ts-ignore
76
let store;

0 commit comments

Comments
 (0)