Skip to content

Commit 6fffe76

Browse files
committed
Include the plugin in unit testing of index.js
1 parent a4f5f86 commit 6fffe76

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

src/index.spec.js

+22-17
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,67 @@
11
import * as actionCreators from './action-creators.js';
2-
import * as reduxFirstVueRouter from './index.js';
2+
import * as reduxFirstVueRouting from './index.js';
33
import middleware from './middleware.js';
4+
import plugin from './plugin.js';
45
import reducer from './reducer.js';
56

67
describe('redux-first-vue-router', () => {
78
it('exports a PUSH action type', () => {
8-
expect(reduxFirstVueRouter.PUSH).toEqual('@@redux-first-vue-router/PUSH');
9+
expect(reduxFirstVueRouting.PUSH).toEqual('@@redux-first-vue-router/PUSH');
910
});
1011

1112
it('exports a REPLACE action type', () => {
12-
expect(reduxFirstVueRouter.REPLACE).toEqual('@@redux-first-vue-router/REPLACE');
13+
expect(reduxFirstVueRouting.REPLACE).toEqual('@@redux-first-vue-router/REPLACE');
1314
});
1415

1516
it('exports a GO action type', () => {
16-
expect(reduxFirstVueRouter.GO).toEqual('@@redux-first-vue-router/GO');
17+
expect(reduxFirstVueRouting.GO).toEqual('@@redux-first-vue-router/GO');
1718
});
1819

1920
it('exports a BACK action type', () => {
20-
expect(reduxFirstVueRouter.BACK).toEqual('@@redux-first-vue-router/BACK');
21+
expect(reduxFirstVueRouting.BACK).toEqual('@@redux-first-vue-router/BACK');
2122
});
2223

2324
it('exports a FORWARD action type', () => {
24-
expect(reduxFirstVueRouter.FORWARD).toEqual('@@redux-first-vue-router/FORWARD');
25+
expect(reduxFirstVueRouting.FORWARD).toEqual('@@redux-first-vue-router/FORWARD');
2526
});
2627

2728
it('exports a LOCATION_CHANGE action type', () => {
28-
expect(reduxFirstVueRouter.LOCATION_CHANGE).toEqual('@@redux-first-vue-router/LOCATION_CHANGE');
29+
expect(reduxFirstVueRouting.LOCATION_CHANGE).toEqual('@@redux-first-vue-router/LOCATION_CHANGE');
2930
});
3031

3132
it('exports a push action creator', () => {
32-
expect(reduxFirstVueRouter.push).toBe(actionCreators.push);
33+
expect(reduxFirstVueRouting.push).toBe(actionCreators.push);
3334
});
3435

3536
it('exports a replace action creator', () => {
36-
expect(reduxFirstVueRouter.replace).toBe(actionCreators.replace);
37+
expect(reduxFirstVueRouting.replace).toBe(actionCreators.replace);
3738
});
3839

3940
it('exports a go action creator', () => {
40-
expect(reduxFirstVueRouter.go).toBe(actionCreators.go);
41+
expect(reduxFirstVueRouting.go).toBe(actionCreators.go);
4142
});
4243

4344
it('exports a back action creator', () => {
44-
expect(reduxFirstVueRouter.back).toBe(actionCreators.back);
45+
expect(reduxFirstVueRouting.back).toBe(actionCreators.back);
4546
});
4647

4748
it('exports a forward action creator', () => {
48-
expect(reduxFirstVueRouter.forward).toBe(actionCreators.forward);
49+
expect(reduxFirstVueRouting.forward).toBe(actionCreators.forward);
4950
});
5051

5152
it('exports a locationChange action creator', () => {
52-
expect(reduxFirstVueRouter.locationChange).toBe(actionCreators.locationChange);
53+
expect(reduxFirstVueRouting.locationChange).toBe(actionCreators.locationChange);
5354
});
5455

55-
it('exports a routerMiddleware method', () => {
56-
expect(reduxFirstVueRouter.middleware).toBe(middleware);
56+
it('exports a middleware method', () => {
57+
expect(reduxFirstVueRouting.middleware).toBe(middleware);
5758
});
5859

59-
it('exports a routerReducer method', () => {
60-
expect(reduxFirstVueRouter.reducer).toBe(reducer);
60+
it('exports a reducer method', () => {
61+
expect(reduxFirstVueRouting.reducer).toBe(reducer);
62+
});
63+
64+
it('exports a Vue plugin by default', () => {
65+
expect(reduxFirstVueRouting.default).toBe(plugin);
6166
});
6267
});

0 commit comments

Comments
 (0)