-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
74 lines (72 loc) · 1.79 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
var helpers = require('./helpers');
var defineGetters = helpers.defineGetters;
var assign = helpers.assign;
var requireCache = {};
exports.component = exports.mount = exports.mockComponent = require('./component');
exports.shallow = function (c, o) {
o = o || {};
assign(o, { shallow : true });
return exports.component(c, o);
};
defineGetters(exports, {
build : function () {
if (!requireCache.build){
requireCache.build = require('./component/build');
}
return requireCache.build;
},
directive : function () {
if (!requireCache.directive){
requireCache.directive = require('./directive');
}
return requireCache.directive;
},
mockDirective : function () {
return exports.directive;
},
store : function () {
if (!requireCache.store){
requireCache.store = require('mock-vuex');
}
return requireCache.store;
},
mockStore : function () {
return exports.store;
},
http : function () {
if (!requireCache.http){
requireCache.http = require('mock-http-client');
}
return requireCache.http;
},
mockHttp : function () {
return exports.http;
},
router : function () {
if (!requireCache.router){
requireCache.router = require('mock-vue-router');
}
return requireCache.router;
},
mockRouter : function () {
return exports.router;
},
trigger : function () {
if (!requireCache.trigger){
requireCache.trigger = require('./trigger');
}
return requireCache.trigger;
},
reactify : function () {
if (!requireCache.reactify){
requireCache.reactify = require('./reactify');
}
return requireCache.reactify;
},
cleanUp : function () {
if (!requireCache.cleanUp){
requireCache.cleanUp = require('./cleanUp');
}
return requireCache.cleanUp;
}
});