|
1 | 1 | import * as actionCreators from './action-creators.js';
|
2 |
| -import * as reduxFirstVueRouter from './index.js'; |
| 2 | +import * as reduxFirstVueRouting from './index.js'; |
3 | 3 | import middleware from './middleware.js';
|
| 4 | +import plugin from './plugin.js'; |
4 | 5 | import reducer from './reducer.js';
|
5 | 6 |
|
6 | 7 | describe('redux-first-vue-router', () => {
|
7 | 8 | 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'); |
9 | 10 | });
|
10 | 11 |
|
11 | 12 | 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'); |
13 | 14 | });
|
14 | 15 |
|
15 | 16 | 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'); |
17 | 18 | });
|
18 | 19 |
|
19 | 20 | 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'); |
21 | 22 | });
|
22 | 23 |
|
23 | 24 | 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'); |
25 | 26 | });
|
26 | 27 |
|
27 | 28 | 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'); |
29 | 30 | });
|
30 | 31 |
|
31 | 32 | it('exports a push action creator', () => {
|
32 |
| - expect(reduxFirstVueRouter.push).toBe(actionCreators.push); |
| 33 | + expect(reduxFirstVueRouting.push).toBe(actionCreators.push); |
33 | 34 | });
|
34 | 35 |
|
35 | 36 | it('exports a replace action creator', () => {
|
36 |
| - expect(reduxFirstVueRouter.replace).toBe(actionCreators.replace); |
| 37 | + expect(reduxFirstVueRouting.replace).toBe(actionCreators.replace); |
37 | 38 | });
|
38 | 39 |
|
39 | 40 | it('exports a go action creator', () => {
|
40 |
| - expect(reduxFirstVueRouter.go).toBe(actionCreators.go); |
| 41 | + expect(reduxFirstVueRouting.go).toBe(actionCreators.go); |
41 | 42 | });
|
42 | 43 |
|
43 | 44 | it('exports a back action creator', () => {
|
44 |
| - expect(reduxFirstVueRouter.back).toBe(actionCreators.back); |
| 45 | + expect(reduxFirstVueRouting.back).toBe(actionCreators.back); |
45 | 46 | });
|
46 | 47 |
|
47 | 48 | it('exports a forward action creator', () => {
|
48 |
| - expect(reduxFirstVueRouter.forward).toBe(actionCreators.forward); |
| 49 | + expect(reduxFirstVueRouting.forward).toBe(actionCreators.forward); |
49 | 50 | });
|
50 | 51 |
|
51 | 52 | it('exports a locationChange action creator', () => {
|
52 |
| - expect(reduxFirstVueRouter.locationChange).toBe(actionCreators.locationChange); |
| 53 | + expect(reduxFirstVueRouting.locationChange).toBe(actionCreators.locationChange); |
53 | 54 | });
|
54 | 55 |
|
55 |
| - it('exports a routerMiddleware method', () => { |
56 |
| - expect(reduxFirstVueRouter.middleware).toBe(middleware); |
| 56 | + it('exports a middleware method', () => { |
| 57 | + expect(reduxFirstVueRouting.middleware).toBe(middleware); |
57 | 58 | });
|
58 | 59 |
|
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); |
61 | 66 | });
|
62 | 67 | });
|
0 commit comments