medusa-test-utils 1.1.45-snapshot-20240717160031 → 1.1.45-snapshot-20240718083016
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/database.d.ts +0 -1
- package/dist/database.js +142 -56
- package/dist/database.js.map +1 -1
- package/dist/id-map.d.ts +2 -3
- package/dist/id-map.js +13 -8
- package/dist/id-map.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/init-modules.d.ts +0 -1
- package/dist/init-modules.js +95 -38
- package/dist/init-modules.js.map +1 -1
- package/dist/jest.d.ts +0 -1
- package/dist/jest.js +62 -14
- package/dist/jest.js.map +1 -1
- package/dist/medusa-test-runner-utils/bootstrap-app.d.ts +5 -10
- package/dist/medusa-test-runner-utils/bootstrap-app.js +146 -54
- package/dist/medusa-test-runner-utils/bootstrap-app.js.map +1 -1
- package/dist/medusa-test-runner-utils/use-db.d.ts +12 -5
- package/dist/medusa-test-runner-utils/use-db.js +143 -29
- package/dist/medusa-test-runner-utils/use-db.js.map +1 -1
- package/dist/medusa-test-runner.d.ts +3 -9
- package/dist/medusa-test-runner.js +332 -144
- package/dist/medusa-test-runner.js.map +1 -1
- package/dist/mock-event-bus-service.d.ts +4 -5
- package/dist/mock-event-bus-service.js +51 -13
- package/dist/mock-event-bus-service.js.map +1 -1
- package/dist/mock-manager.d.ts +9 -0
- package/dist/mock-manager.js +30 -0
- package/dist/mock-manager.js.map +1 -0
- package/dist/mock-repository.d.ts +51 -0
- package/dist/mock-repository.js +193 -0
- package/dist/mock-repository.js.map +1 -0
- package/dist/module-test-runner.d.ts +2 -3
- package/dist/module-test-runner.js +129 -60
- package/dist/module-test-runner.js.map +1 -1
- package/package.json +12 -7
- package/dist/database.d.ts.map +0 -1
- package/dist/events.d.ts +0 -3
- package/dist/events.d.ts.map +0 -1
- package/dist/events.js +0 -24
- package/dist/events.js.map +0 -1
- package/dist/id-map.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/init-modules.d.ts.map +0 -1
- package/dist/jest.d.ts.map +0 -1
- package/dist/medusa-test-runner-utils/bootstrap-app.d.ts.map +0 -1
- package/dist/medusa-test-runner-utils/use-db.d.ts.map +0 -1
- package/dist/medusa-test-runner.d.ts.map +0 -1
- package/dist/mock-event-bus-service.d.ts.map +0 -1
- package/dist/module-test-runner.d.ts.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mock-event-bus-service.js","sourceRoot":"","sources":["../src/mock-event-bus-service.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"mock-event-bus-service.js","sourceRoot":"","sources":["../src/mock-event-bus-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;IAAA;IAgCA,CAAC;IAvBO,8BAAI,GAAV,UAOE,WAAmB,EACnB,IAAQ,EACR,OAAqC;QAArC,wBAAA,EAAA,YAAqC;;;;KACpB;IAEnB,mCAAS,GAAT,UAAU,KAAsB,EAAE,UAAsB;QACtD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,qCAAW,GAAX,UACE,KAAsB,EACtB,UAAsB,EACtB,OAAyC;QAEzC,OAAO,IAAI,CAAA;IACb,CAAC;IACH,sBAAC;AAAD,CAAC,AAhCD,IAgCC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
namespace connection {
|
3
|
+
function getMetadata(target: any): any;
|
4
|
+
}
|
5
|
+
function getRepository(repo: any): any;
|
6
|
+
function withRepository(repo: any): any;
|
7
|
+
function transaction(isolationOrCb: any, cb: any): any;
|
8
|
+
}
|
9
|
+
export default _default;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = {
|
4
|
+
connection: {
|
5
|
+
getMetadata: function (target) {
|
6
|
+
var _a;
|
7
|
+
return ((_a = target["metadata"]) !== null && _a !== void 0 ? _a : {
|
8
|
+
columns: [],
|
9
|
+
});
|
10
|
+
},
|
11
|
+
},
|
12
|
+
getRepository: function (repo) {
|
13
|
+
return repo;
|
14
|
+
},
|
15
|
+
withRepository: function (repo) {
|
16
|
+
if (repo) {
|
17
|
+
return Object.assign(repo, { manager: this });
|
18
|
+
}
|
19
|
+
return repo;
|
20
|
+
},
|
21
|
+
transaction: function (isolationOrCb, cb) {
|
22
|
+
if (typeof isolationOrCb === "string") {
|
23
|
+
return cb(this);
|
24
|
+
}
|
25
|
+
else {
|
26
|
+
return isolationOrCb(this);
|
27
|
+
}
|
28
|
+
},
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=mock-manager.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mock-manager.js","sourceRoot":"","sources":["../src/mock-manager.js"],"names":[],"mappings":";;AAAA,kBAAe;IACb,UAAU,EAAE;QACV,WAAW,EAAE,UAAC,MAAM;;YAClB,OAAO,CACL,MAAA,MAAM,CAAC,UAAU,CAAC,mCAAI;gBACpB,OAAO,EAAE,EAAE;aACZ,CACF,CAAA;QACH,CAAC;KACF;IAED,aAAa,EAAE,UAAU,IAAI;QAC3B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,cAAc,EAAE,UAAU,IAAI;QAC5B,IAAI,IAAI,EAAE;YACR,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAA;SAC9C;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,WAAW,EAAE,UAAU,aAAa,EAAE,EAAE;QACtC,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;SAChB;aAAM;YACL,OAAO,aAAa,CAAC,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;CACF,CAAA"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
declare function _default(methods?: {}): MockRepo;
|
2
|
+
export default _default;
|
3
|
+
declare class MockRepo {
|
4
|
+
constructor({ create, update, remove, softRemove, find, findDescendantsTree, findOne, findOneWithRelations, findOneOrFail, save, findAndCount, del, count, insertBulk, metadata, }: {
|
5
|
+
create: any;
|
6
|
+
update: any;
|
7
|
+
remove: any;
|
8
|
+
softRemove: any;
|
9
|
+
find: any;
|
10
|
+
findDescendantsTree: any;
|
11
|
+
findOne: any;
|
12
|
+
findOneWithRelations: any;
|
13
|
+
findOneOrFail: any;
|
14
|
+
save: any;
|
15
|
+
findAndCount: any;
|
16
|
+
del: any;
|
17
|
+
count: any;
|
18
|
+
insertBulk: any;
|
19
|
+
metadata: any;
|
20
|
+
});
|
21
|
+
create_: any;
|
22
|
+
update_: any;
|
23
|
+
remove_: any;
|
24
|
+
delete_: any;
|
25
|
+
softRemove_: any;
|
26
|
+
find_: any;
|
27
|
+
findDescendantsTree_: any;
|
28
|
+
findOne_: any;
|
29
|
+
findOneOrFail_: any;
|
30
|
+
save_: any;
|
31
|
+
findAndCount_: any;
|
32
|
+
findOneWithRelations_: any;
|
33
|
+
insertBulk_: any;
|
34
|
+
count_: any;
|
35
|
+
metadata: any;
|
36
|
+
setFindOne(fn: any): void;
|
37
|
+
insertBulk: jest.Mock<any, any>;
|
38
|
+
create: jest.Mock<any, any>;
|
39
|
+
softRemove: jest.Mock<any, any>;
|
40
|
+
remove: jest.Mock<any, any>;
|
41
|
+
update: jest.Mock<any, any>;
|
42
|
+
findOneOrFail: jest.Mock<any, any>;
|
43
|
+
findOneWithRelations: jest.Mock<any, any>;
|
44
|
+
findOne: jest.Mock<any, any>;
|
45
|
+
findDescendantsTree: jest.Mock<any, any>;
|
46
|
+
find: jest.Mock<any, any>;
|
47
|
+
save: jest.Mock<any, any>;
|
48
|
+
findAndCount: jest.Mock<any, any>;
|
49
|
+
count: jest.Mock<any, any>;
|
50
|
+
delete: jest.Mock<any, any>;
|
51
|
+
}
|
@@ -0,0 +1,193 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
4
|
+
if (!m) return o;
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
6
|
+
try {
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
8
|
+
}
|
9
|
+
catch (error) { e = { error: error }; }
|
10
|
+
finally {
|
11
|
+
try {
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
13
|
+
}
|
14
|
+
finally { if (e) throw e.error; }
|
15
|
+
}
|
16
|
+
return ar;
|
17
|
+
};
|
18
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
19
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
20
|
+
if (ar || !(i in from)) {
|
21
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
22
|
+
ar[i] = from[i];
|
23
|
+
}
|
24
|
+
}
|
25
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
26
|
+
};
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
28
|
+
var MockRepo = /** @class */ (function () {
|
29
|
+
function MockRepo(_a) {
|
30
|
+
var _this = this;
|
31
|
+
var create = _a.create, update = _a.update, remove = _a.remove, softRemove = _a.softRemove, find = _a.find, findDescendantsTree = _a.findDescendantsTree, findOne = _a.findOne, findOneWithRelations = _a.findOneWithRelations, findOneOrFail = _a.findOneOrFail, save = _a.save, findAndCount = _a.findAndCount, del = _a.del, count = _a.count, insertBulk = _a.insertBulk, metadata = _a.metadata;
|
32
|
+
this.insertBulk = jest.fn().mockImplementation(function () {
|
33
|
+
var args = [];
|
34
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
35
|
+
args[_i] = arguments[_i];
|
36
|
+
}
|
37
|
+
if (_this.insertBulk_) {
|
38
|
+
return _this.insertBulk_.apply(_this, __spreadArray([], __read(args), false));
|
39
|
+
}
|
40
|
+
return {};
|
41
|
+
});
|
42
|
+
this.create = jest.fn().mockImplementation(function () {
|
43
|
+
var args = [];
|
44
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
45
|
+
args[_i] = arguments[_i];
|
46
|
+
}
|
47
|
+
if (_this.create_) {
|
48
|
+
return _this.create_.apply(_this, __spreadArray([], __read(args), false));
|
49
|
+
}
|
50
|
+
return {};
|
51
|
+
});
|
52
|
+
this.softRemove = jest.fn().mockImplementation(function () {
|
53
|
+
var args = [];
|
54
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
55
|
+
args[_i] = arguments[_i];
|
56
|
+
}
|
57
|
+
if (_this.softRemove_) {
|
58
|
+
return _this.softRemove_.apply(_this, __spreadArray([], __read(args), false));
|
59
|
+
}
|
60
|
+
return {};
|
61
|
+
});
|
62
|
+
this.remove = jest.fn().mockImplementation(function () {
|
63
|
+
var args = [];
|
64
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
65
|
+
args[_i] = arguments[_i];
|
66
|
+
}
|
67
|
+
if (_this.remove_) {
|
68
|
+
return _this.remove_.apply(_this, __spreadArray([], __read(args), false));
|
69
|
+
}
|
70
|
+
return {};
|
71
|
+
});
|
72
|
+
this.update = jest.fn().mockImplementation(function () {
|
73
|
+
var args = [];
|
74
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
75
|
+
args[_i] = arguments[_i];
|
76
|
+
}
|
77
|
+
if (_this.update_) {
|
78
|
+
return _this.update_.apply(_this, __spreadArray([], __read(args), false));
|
79
|
+
}
|
80
|
+
});
|
81
|
+
this.findOneOrFail = jest.fn().mockImplementation(function () {
|
82
|
+
var args = [];
|
83
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
84
|
+
args[_i] = arguments[_i];
|
85
|
+
}
|
86
|
+
if (_this.findOneOrFail_) {
|
87
|
+
return _this.findOneOrFail_.apply(_this, __spreadArray([], __read(args), false));
|
88
|
+
}
|
89
|
+
});
|
90
|
+
this.findOneWithRelations = jest.fn().mockImplementation(function () {
|
91
|
+
var args = [];
|
92
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
93
|
+
args[_i] = arguments[_i];
|
94
|
+
}
|
95
|
+
if (_this.findOneWithRelations_) {
|
96
|
+
return _this.findOneWithRelations_.apply(_this, __spreadArray([], __read(args), false));
|
97
|
+
}
|
98
|
+
});
|
99
|
+
this.findOne = jest.fn().mockImplementation(function () {
|
100
|
+
var args = [];
|
101
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
102
|
+
args[_i] = arguments[_i];
|
103
|
+
}
|
104
|
+
if (_this.findOne_) {
|
105
|
+
return _this.findOne_.apply(_this, __spreadArray([], __read(args), false));
|
106
|
+
}
|
107
|
+
});
|
108
|
+
this.findDescendantsTree = jest.fn().mockImplementation(function () {
|
109
|
+
var args = [];
|
110
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
111
|
+
args[_i] = arguments[_i];
|
112
|
+
}
|
113
|
+
if (_this.findDescendantsTree_) {
|
114
|
+
return _this.findDescendantsTree_.apply(_this, __spreadArray([], __read(args), false));
|
115
|
+
}
|
116
|
+
});
|
117
|
+
this.find = jest.fn().mockImplementation(function () {
|
118
|
+
var args = [];
|
119
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
120
|
+
args[_i] = arguments[_i];
|
121
|
+
}
|
122
|
+
if (_this.find_) {
|
123
|
+
return _this.find_.apply(_this, __spreadArray([], __read(args), false));
|
124
|
+
}
|
125
|
+
});
|
126
|
+
this.save = jest.fn().mockImplementation(function () {
|
127
|
+
var args = [];
|
128
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
129
|
+
args[_i] = arguments[_i];
|
130
|
+
}
|
131
|
+
if (_this.save_) {
|
132
|
+
return _this.save_.apply(_this, __spreadArray([], __read(args), false));
|
133
|
+
}
|
134
|
+
return Promise.resolve.apply(Promise, __spreadArray([], __read(args), false));
|
135
|
+
});
|
136
|
+
this.findAndCount = jest.fn().mockImplementation(function () {
|
137
|
+
var args = [];
|
138
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
139
|
+
args[_i] = arguments[_i];
|
140
|
+
}
|
141
|
+
if (_this.findAndCount_) {
|
142
|
+
return _this.findAndCount_.apply(_this, __spreadArray([], __read(args), false));
|
143
|
+
}
|
144
|
+
return {};
|
145
|
+
});
|
146
|
+
this.count = jest.fn().mockImplementation(function () {
|
147
|
+
var args = [];
|
148
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
149
|
+
args[_i] = arguments[_i];
|
150
|
+
}
|
151
|
+
if (_this.count_) {
|
152
|
+
return _this.count_.apply(_this, __spreadArray([], __read(args), false));
|
153
|
+
}
|
154
|
+
return {};
|
155
|
+
});
|
156
|
+
this.delete = jest.fn().mockImplementation(function () {
|
157
|
+
var args = [];
|
158
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
159
|
+
args[_i] = arguments[_i];
|
160
|
+
}
|
161
|
+
if (_this.delete_) {
|
162
|
+
return _this.delete_.apply(_this, __spreadArray([], __read(args), false));
|
163
|
+
}
|
164
|
+
return {};
|
165
|
+
});
|
166
|
+
this.create_ = create;
|
167
|
+
this.update_ = update;
|
168
|
+
this.remove_ = remove;
|
169
|
+
this.delete_ = del;
|
170
|
+
this.softRemove_ = softRemove;
|
171
|
+
this.find_ = find;
|
172
|
+
this.findDescendantsTree_ = findDescendantsTree;
|
173
|
+
this.findOne_ = findOne;
|
174
|
+
this.findOneOrFail_ = findOneOrFail;
|
175
|
+
this.save_ = save;
|
176
|
+
this.findAndCount_ = findAndCount;
|
177
|
+
this.findOneWithRelations_ = findOneWithRelations;
|
178
|
+
this.insertBulk_ = insertBulk;
|
179
|
+
this.count_ = count;
|
180
|
+
this.metadata = metadata !== null && metadata !== void 0 ? metadata : {
|
181
|
+
columns: [],
|
182
|
+
};
|
183
|
+
}
|
184
|
+
MockRepo.prototype.setFindOne = function (fn) {
|
185
|
+
this.findOne_ = fn;
|
186
|
+
};
|
187
|
+
return MockRepo;
|
188
|
+
}());
|
189
|
+
exports.default = (function (methods) {
|
190
|
+
if (methods === void 0) { methods = {}; }
|
191
|
+
return new MockRepo(methods);
|
192
|
+
});
|
193
|
+
//# sourceMappingURL=mock-repository.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mock-repository.js","sourceRoot":"","sources":["../src/mock-repository.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IACE,kBAAY,EAgBX;QAhBD,iBAmCC;YAlCC,MAAM,YAAA,EACN,MAAM,YAAA,EACN,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,IAAI,UAAA,EACJ,mBAAmB,yBAAA,EACnB,OAAO,aAAA,EACP,oBAAoB,0BAAA,EACpB,aAAa,mBAAA,EACb,IAAI,UAAA,EACJ,YAAY,kBAAA,EACZ,GAAG,SAAA,EACH,KAAK,WAAA,EACL,UAAU,gBAAA,EACV,QAAQ,cAAA;QA0BV,eAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC;YAAC,cAAO;iBAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;gBAAP,yBAAO;;YAChD,IAAI,KAAI,CAAC,WAAW,EAAE;gBACpB,OAAO,KAAI,CAAC,WAAW,OAAhB,KAAI,2BAAgB,IAAI,WAAC;aACjC;YACD,OAAO,EAAE,CAAA;QACX,CAAC,CAAC,CAAA;QACF,WAAM,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC;YAAC,cAAO;iBAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;gBAAP,yBAAO;;YAC5C,IAAI,KAAI,CAAC,OAAO,EAAE;gBAChB,OAAO,KAAI,CAAC,OAAO,OAAZ,KAAI,2BAAY,IAAI,WAAC;aAC7B;YACD,OAAO,EAAE,CAAA;QACX,CAAC,CAAC,CAAA;QACF,eAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC;YAAC,cAAO;iBAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;gBAAP,yBAAO;;YAChD,IAAI,KAAI,CAAC,WAAW,EAAE;gBACpB,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,CAAC,MAAM,GAAG,KAAK,CAAA;QAEnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI;YAC1B,OAAO,EAAE,EAAE;SACZ,CAAA;IACH,CAAC;IAED,6BAAU,GAAV,UAAW,EAAE;QACX,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;IACpB,CAAC;IAkFH,eAAC;AAAD,CAAC,AA1HD,IA0HC;AAED,mBAAe,UAAC,OAAY;IAAZ,wBAAA,EAAA,YAAY;IAC1B,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAA;AAC9B,CAAC,EAAA"}
|
@@ -8,7 +8,7 @@ export interface SuiteOptions<TService = unknown> {
|
|
8
8
|
clientUrl: string;
|
9
9
|
};
|
10
10
|
}
|
11
|
-
export declare function moduleIntegrationTestRunner
|
11
|
+
export declare function moduleIntegrationTestRunner({ moduleName, moduleModels, moduleOptions, joinerConfig, schema, debug, testSuite, resolve, injectedDependencies, }: {
|
12
12
|
moduleName: string;
|
13
13
|
moduleModels?: any[];
|
14
14
|
moduleOptions?: Record<string, any>;
|
@@ -18,6 +18,5 @@ export declare function moduleIntegrationTestRunner<TService = any>({ moduleName
|
|
18
18
|
injectedDependencies?: Record<string, any>;
|
19
19
|
resolve?: string;
|
20
20
|
debug?: boolean;
|
21
|
-
testSuite: (options: SuiteOptions<TService>) => void;
|
21
|
+
testSuite: <TService = unknown>(options: SuiteOptions<TService>) => void;
|
22
22
|
}): void;
|
23
|
-
//# sourceMappingURL=module-test-runner.d.ts.map
|
@@ -1,91 +1,160 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
3
|
+
__assign = Object.assign || function(t) {
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
+
s = arguments[i];
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
+
t[p] = s[p];
|
8
|
+
}
|
9
|
+
return t;
|
10
|
+
};
|
11
|
+
return __assign.apply(this, arguments);
|
12
|
+
};
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
20
|
+
});
|
21
|
+
};
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
26
|
+
function step(op) {
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
31
|
+
switch (op[0]) {
|
32
|
+
case 0: case 1: t = op; break;
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
36
|
+
default:
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
41
|
+
if (t[2]) _.ops.pop();
|
42
|
+
_.trys.pop(); continue;
|
43
|
+
}
|
44
|
+
op = body.call(thisArg, _);
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
47
|
+
}
|
48
|
+
};
|
2
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
50
|
exports.moduleIntegrationTestRunner = void 0;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
function moduleIntegrationTestRunner(
|
9
|
-
|
51
|
+
var init_modules_1 = require("./init-modules");
|
52
|
+
var database_1 = require("./database");
|
53
|
+
var _1 = require(".");
|
54
|
+
var utils_1 = require("@medusajs/utils");
|
55
|
+
function moduleIntegrationTestRunner(_a) {
|
56
|
+
var _b, _c;
|
57
|
+
var _this = this;
|
58
|
+
var moduleName = _a.moduleName, moduleModels = _a.moduleModels, _d = _a.moduleOptions, moduleOptions = _d === void 0 ? {} : _d, _e = _a.joinerConfig, joinerConfig = _e === void 0 ? [] : _e, _f = _a.schema, schema = _f === void 0 ? "public" : _f, _g = _a.debug, debug = _g === void 0 ? false : _g, testSuite = _a.testSuite, resolve = _a.resolve, _h = _a.injectedDependencies, injectedDependencies = _h === void 0 ? {} : _h;
|
59
|
+
var moduleSdkImports = require("@medusajs/modules-sdk");
|
10
60
|
process.env.LOG_LEVEL = "error";
|
11
|
-
moduleModels
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
61
|
+
moduleModels !== null && moduleModels !== void 0 ? moduleModels : (moduleModels = Object.values(require("".concat(process.cwd(), "/src/models"))));
|
62
|
+
// migrationPath ??= process.cwd() + "/src/migrations/!(*.d).{js,ts,cjs}"
|
63
|
+
var tempName = parseInt(process.env.JEST_WORKER_ID || "1");
|
64
|
+
var dbName = "medusa-".concat(moduleName.toLowerCase(), "-integration-").concat(tempName);
|
65
|
+
var dbConfig = {
|
16
66
|
clientUrl: (0, database_1.getDatabaseURL)(dbName),
|
17
|
-
schema,
|
18
|
-
debug,
|
67
|
+
schema: schema,
|
68
|
+
debug: debug,
|
19
69
|
};
|
20
70
|
// Use a unique connection for all the entire suite
|
21
|
-
|
22
|
-
|
71
|
+
var connection = utils_1.ModulesSdkUtils.createPgConnection(dbConfig);
|
72
|
+
var MikroOrmWrapper = (0, database_1.getMikroOrmWrapper)({
|
23
73
|
mikroOrmEntities: moduleModels,
|
24
74
|
clientUrl: dbConfig.clientUrl,
|
25
75
|
schema: dbConfig.schema,
|
26
76
|
});
|
27
|
-
|
28
|
-
[moduleName]
|
77
|
+
var modulesConfig_ = (_b = {},
|
78
|
+
_b[moduleName] = {
|
29
79
|
definition: moduleSdkImports.ModulesDefinition[moduleName],
|
30
|
-
resolve,
|
31
|
-
options: {
|
32
|
-
|
33
|
-
|
34
|
-
},
|
35
|
-
},
|
36
|
-
};
|
37
|
-
const moduleOptions_ = {
|
38
|
-
injectedDependencies: {
|
39
|
-
[utils_1.ContainerRegistrationKeys.PG_CONNECTION]: connection,
|
40
|
-
eventBusModuleService: new _1.MockEventBusService(),
|
41
|
-
[utils_1.ContainerRegistrationKeys.LOGGER]: console,
|
42
|
-
...injectedDependencies,
|
80
|
+
resolve: resolve,
|
81
|
+
options: __assign({ defaultAdapterOptions: {
|
82
|
+
database: dbConfig,
|
83
|
+
}, database: dbConfig }, moduleOptions),
|
43
84
|
},
|
85
|
+
_b);
|
86
|
+
var moduleOptions_ = {
|
87
|
+
injectedDependencies: __assign((_c = {}, _c[utils_1.ContainerRegistrationKeys.PG_CONNECTION] = connection, _c.eventBusService = new _1.MockEventBusService(), _c[utils_1.ContainerRegistrationKeys.LOGGER] = console, _c), injectedDependencies),
|
44
88
|
modulesConfig: modulesConfig_,
|
45
89
|
databaseConfig: dbConfig,
|
46
|
-
joinerConfig,
|
90
|
+
joinerConfig: joinerConfig,
|
47
91
|
preventConnectionDestroyWarning: true,
|
48
92
|
};
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
MikroOrmWrapper,
|
93
|
+
var shutdown;
|
94
|
+
var moduleService;
|
95
|
+
var medusaApp = {};
|
96
|
+
var options = {
|
97
|
+
MikroOrmWrapper: MikroOrmWrapper,
|
54
98
|
medusaApp: new Proxy({}, {
|
55
|
-
get: (target, prop)
|
99
|
+
get: function (target, prop) {
|
56
100
|
return medusaApp[prop];
|
57
101
|
},
|
58
102
|
}),
|
59
103
|
service: new Proxy({}, {
|
60
|
-
get: (target, prop)
|
104
|
+
get: function (target, prop) {
|
61
105
|
return moduleService[prop];
|
62
106
|
},
|
63
107
|
}),
|
64
|
-
dbConfig: {
|
65
|
-
schema,
|
66
|
-
clientUrl: dbConfig.clientUrl,
|
67
|
-
},
|
68
108
|
};
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
109
|
+
var beforeEach_ = function () { return __awaiter(_this, void 0, void 0, function () {
|
110
|
+
var output;
|
111
|
+
return __generator(this, function (_a) {
|
112
|
+
switch (_a.label) {
|
113
|
+
case 0: return [4 /*yield*/, MikroOrmWrapper.setupDatabase()];
|
114
|
+
case 1:
|
115
|
+
_a.sent();
|
116
|
+
return [4 /*yield*/, (0, init_modules_1.initModules)(moduleOptions_)];
|
117
|
+
case 2:
|
118
|
+
output = _a.sent();
|
119
|
+
shutdown = output.shutdown;
|
120
|
+
medusaApp = output.medusaApp;
|
121
|
+
moduleService = output.medusaApp.modules[moduleName];
|
122
|
+
return [2 /*return*/];
|
123
|
+
}
|
124
|
+
});
|
125
|
+
}); };
|
126
|
+
var afterEach_ = function () { return __awaiter(_this, void 0, void 0, function () {
|
127
|
+
return __generator(this, function (_a) {
|
128
|
+
switch (_a.label) {
|
129
|
+
case 0: return [4 /*yield*/, MikroOrmWrapper.clearDatabase()];
|
130
|
+
case 1:
|
131
|
+
_a.sent();
|
132
|
+
return [4 /*yield*/, shutdown()];
|
133
|
+
case 2:
|
134
|
+
_a.sent();
|
135
|
+
moduleService = {};
|
136
|
+
medusaApp = {};
|
137
|
+
return [2 /*return*/];
|
138
|
+
}
|
139
|
+
});
|
140
|
+
}); };
|
141
|
+
return describe("", function () {
|
83
142
|
beforeEach(beforeEach_);
|
84
143
|
afterEach(afterEach_);
|
85
|
-
afterAll(
|
86
|
-
|
87
|
-
|
88
|
-
|
144
|
+
afterAll(function () { return __awaiter(_this, void 0, void 0, function () {
|
145
|
+
var _a;
|
146
|
+
return __generator(this, function (_b) {
|
147
|
+
switch (_b.label) {
|
148
|
+
case 0: return [4 /*yield*/, ((_a = connection.context) === null || _a === void 0 ? void 0 : _a.destroy())];
|
149
|
+
case 1:
|
150
|
+
_b.sent();
|
151
|
+
return [4 /*yield*/, connection.destroy()];
|
152
|
+
case 2:
|
153
|
+
_b.sent();
|
154
|
+
return [2 /*return*/];
|
155
|
+
}
|
156
|
+
});
|
157
|
+
}); });
|
89
158
|
testSuite(options);
|
90
159
|
});
|
91
160
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"module-test-runner.js","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"module-test-runner.js","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgE;AAChE,uCAA6E;AAE7E,sBAAuC;AACvC,yCAA4E;AAY5E,SAAgB,2BAA2B,CAAC,EAqB3C;;IArBD,iBA2HC;QA1HC,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,qBAAkB,EAA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EAAA;;oBAArC,SAAqC,CAAA;oBACrC,qBAAM,QAAQ,EAAE,EAAA;;oBAAhB,SAAgB,CAAA;oBAChB,aAAa,GAAG,EAAE,CAAA;oBAClB,SAAS,GAAG,EAAE,CAAA;;;;SACf,CAAA;IAED,OAAO,QAAQ,CAAC,EAAE,EAAE;QAClB,UAAU,CAAC,WAAW,CAAC,CAAA;QACvB,SAAS,CAAC,UAAU,CAAC,CAAA;QACrB,QAAQ,CAAC;;;;4BACP,qBAAM,CAAA,MAAC,UAAkB,CAAC,OAAO,0CAAE,OAAO,EAAE,CAAA,EAAA;;wBAA5C,SAA4C,CAAA;wBAC5C,qBAAO,UAAkB,CAAC,OAAO,EAAE,EAAA;;wBAAnC,SAAmC,CAAA;;;;aACpC,CAAC,CAAA;QAEF,SAAS,CAAC,OAAO,CAAC,CAAA;IACpB,CAAC,CAAC,CAAA;AACJ,CAAC;AA3HD,kEA2HC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "medusa-test-utils",
|
3
|
-
"version": "1.1.45-snapshot-
|
3
|
+
"version": "1.1.45-snapshot-20240718083016",
|
4
4
|
"description": "Test utils for Medusa",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"repository": {
|
@@ -24,19 +24,20 @@
|
|
24
24
|
"author": "Sebastian Rindom",
|
25
25
|
"license": "MIT",
|
26
26
|
"devDependencies": {
|
27
|
-
"@medusajs/types": "1.
|
27
|
+
"@medusajs/types": "1.11.17-snapshot-20240718083016",
|
28
28
|
"cross-env": "^5.2.1",
|
29
|
-
"jest": "^
|
29
|
+
"jest": "^25.5.4",
|
30
30
|
"rimraf": "^3.0.2",
|
31
31
|
"typescript": "^5.1.6"
|
32
32
|
},
|
33
33
|
"peerDependencies": {
|
34
|
-
"@medusajs/medusa": "1.20.
|
35
|
-
"@medusajs/modules-sdk": "1.
|
34
|
+
"@medusajs/medusa": "1.20.8-snapshot-20240718083016",
|
35
|
+
"@medusajs/modules-sdk": "1.12.12-snapshot-20240718083016",
|
36
36
|
"axios": "^0.28.0",
|
37
37
|
"express": "^4.18.3",
|
38
38
|
"get-port": "^5.1.0",
|
39
|
-
"pg-god": "^1.0.12"
|
39
|
+
"pg-god": "^1.0.12",
|
40
|
+
"typeorm": "^0.2.43"
|
40
41
|
},
|
41
42
|
"peerDependenciesMeta": {
|
42
43
|
"@medusajs/medusa": {
|
@@ -53,12 +54,16 @@
|
|
53
54
|
},
|
54
55
|
"pg-god": {
|
55
56
|
"optional": true
|
57
|
+
},
|
58
|
+
"typeorm": {
|
59
|
+
"optional": true
|
56
60
|
}
|
57
61
|
},
|
58
62
|
"dependencies": {
|
59
|
-
"@medusajs/utils": "1.
|
63
|
+
"@medusajs/utils": "1.11.10-snapshot-20240718083016",
|
60
64
|
"@mikro-orm/migrations": "5.9.7",
|
61
65
|
"@mikro-orm/postgresql": "5.9.7",
|
66
|
+
"medusa-core-utils": "1.2.3-snapshot-20240718083016",
|
62
67
|
"randomatic": "^3.1.1"
|
63
68
|
},
|
64
69
|
"gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808"
|
package/dist/database.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE3E,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAStD;AAED,wBAAgB,iBAAiB,CAAC,EAChC,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,MAAM,GACP,EAAE;IACD,gBAAgB,EAAE,GAAG,EAAE,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,OAAO,CAcV;AAED,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,GAAG,EAAE,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAEhC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,UAAU,IAAI,gBAAgB,CAAA;IAC9B,WAAW,IAAI,gBAAgB,CAAA;IAC/B,MAAM,IAAI,QAAQ,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,MAAM,GACP,EAAE;IACD,gBAAgB,EAAE,GAAG,EAAE,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,YAAY,CA2Ff"}
|
package/dist/events.d.ts
DELETED
package/dist/events.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAGxD,eAAO,MAAM,wBAAwB,cACxB,MAAM,YACP,sBAAsB,mBAsBjC,CAAA"}
|