not-node 6.2.18 → 6.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/package.json +7 -4
  3. package/src/auth/roles.js +9 -1
  4. package/src/auth/rules.js +5 -5
  5. package/src/cli/actions/env.mjs +1 -1
  6. package/src/cli/actions/nginx.mjs +1 -1
  7. package/src/cli/actions/pm2.mjs +1 -1
  8. package/src/common.js +1 -1
  9. package/src/domain.js +36 -24
  10. package/src/form/env_extractors/index.js +2 -2
  11. package/src/form/extractors/index.js +1 -1
  12. package/src/identity/providers/session.js +3 -0
  13. package/src/manifest/batchRunner.js +5 -1
  14. package/src/manifest/registrator/fields.js +4 -4
  15. package/src/manifest/route.js +9 -0
  16. package/src/model/exceptions.js +3 -3
  17. package/src/model/versioning.js +2 -2
  18. package/test/auth/routes.js +34 -10
  19. package/test/fakes.js +52 -0
  20. package/test/identity/providers/session.js +14 -5
  21. package/test/identity/providers/token.js +1 -1
  22. package/test/init/additional.js +31 -33
  23. package/test/init/app.js +66 -10
  24. package/test/init/bodyparser.js +4 -1
  25. package/test/init/compression.js +4 -1
  26. package/test/init/cors.js +5 -1
  27. package/test/init/csp.js +2 -2
  28. package/test/init/db.js +5 -1
  29. package/test/init/env.js +12 -2
  30. package/test/init/express.js +4 -1
  31. package/test/init/fileupload.js +4 -1
  32. package/test/init/http.js +21 -4
  33. package/test/init/middleware.js +13 -1
  34. package/test/init/routes.js +1 -0
  35. package/test/init/sessions/mongoose.js +5 -1
  36. package/test/init/sessions/redis.js +5 -1
  37. package/test/init/sessions.js +21 -15
  38. package/test/init/static.js +4 -1
  39. package/test/init/template.js +5 -1
  40. package/test/model/versioning.js +3 -3
  41. package/test/module/fields.js +45 -20
  42. package/test/module/index.js +26 -15
  43. package/test/notApp.js +221 -187
  44. package/test/notDomain.js +799 -707
  45. package/test/notManifestFilter.js +385 -322
  46. package/test/notModule.js +689 -644
  47. package/test/notRoute.js +112 -99
  48. package/test/testies/module/fields/collection.js +16 -14
  49. package/test/testies/module/fields/single.js +11 -11
  50. package/tmpl/files/module.server/layers/forms/_data.ejs +29 -29
  51. package/tmpl/files/module.server/layers/forms/create.ejs +38 -38
  52. package/tmpl/files/module.server/layers/forms/listAll.ejs +3 -3
  53. package/tmpl/files/module.server/layers/forms/listAndCount.ejs +3 -3
  54. package/tmpl/files/module.server/layers/forms/update.ejs +31 -31
@@ -1,11 +1,11 @@
1
1
  const Provider = require("../../../src/identity/providers/session");
2
-
2
+ const { DEFAULT_USER_ROLE_FOR_GUEST } = require("../../../src/auth/const");
3
3
  const mongoose = require("mongoose");
4
4
 
5
5
  const SESSION_NOT_EXISTS = "session not exists";
6
6
 
7
7
  module.exports = ({ expect }) => {
8
- describe(`${Provider.constructor.name}`, () => {
8
+ describe(`${Provider.name}`, () => {
9
9
  describe("isUser", function () {
10
10
  it("check if user exists - true", function () {
11
11
  var t = {
@@ -40,6 +40,7 @@ module.exports = ({ expect }) => {
40
40
  var t = {
41
41
  session: {
42
42
  user: mongoose.Types.ObjectId(),
43
+ save() {},
43
44
  },
44
45
  };
45
46
  var res = new Provider(t).isRoot();
@@ -53,6 +54,7 @@ module.exports = ({ expect }) => {
53
54
  session: {
54
55
  user: mongoose.Types.ObjectId(),
55
56
  role: "root",
57
+ save() {},
56
58
  },
57
59
  };
58
60
  var res = new Provider(t).getRole();
@@ -62,10 +64,11 @@ module.exports = ({ expect }) => {
62
64
  var t = {
63
65
  session: {
64
66
  user: mongoose.Types.ObjectId(),
67
+ save() {},
65
68
  },
66
69
  };
67
70
  var res = new Provider(t).getRole();
68
- expect(res).to.eql(undefined);
71
+ expect(res).to.eql([DEFAULT_USER_ROLE_FOR_GUEST]);
69
72
  });
70
73
  });
71
74
 
@@ -75,6 +78,7 @@ module.exports = ({ expect }) => {
75
78
  session: {
76
79
  user: mongoose.Types.ObjectId(),
77
80
  role: "user",
81
+ save() {},
78
82
  },
79
83
  };
80
84
  new Provider(t).setRole("root");
@@ -93,6 +97,7 @@ module.exports = ({ expect }) => {
93
97
  const t = {
94
98
  session: {
95
99
  role: "user",
100
+ save() {},
96
101
  },
97
102
  };
98
103
  const id = mongoose.Types.ObjectId();
@@ -114,6 +119,7 @@ module.exports = ({ expect }) => {
114
119
  session: {
115
120
  user: mongoose.Types.ObjectId(),
116
121
  role: "user",
122
+ save() {},
117
123
  },
118
124
  };
119
125
  const id = new Provider(t).getUserId();
@@ -133,6 +139,7 @@ module.exports = ({ expect }) => {
133
139
  session: {
134
140
  id: mongoose.Types.ObjectId(),
135
141
  role: "user",
142
+ save() {},
136
143
  },
137
144
  };
138
145
  const id = new Provider(t).getSessionId();
@@ -149,7 +156,7 @@ module.exports = ({ expect }) => {
149
156
  describe("setAuth", function () {
150
157
  it("session exist", function () {
151
158
  const t = {
152
- session: {},
159
+ session: { save() {} },
153
160
  };
154
161
  const id = mongoose.Types.ObjectId();
155
162
  new Provider(t).setAuth(id, "root");
@@ -169,7 +176,7 @@ module.exports = ({ expect }) => {
169
176
  it("session exist", function () {
170
177
  const id = mongoose.Types.ObjectId();
171
178
  const t = {
172
- session: { user: id, role: "admin" },
179
+ session: { user: id, role: "admin", save() {} },
173
180
  user: { _id: id },
174
181
  };
175
182
  new Provider(t).setGuest();
@@ -193,6 +200,7 @@ module.exports = ({ expect }) => {
193
200
  session: {
194
201
  user: id,
195
202
  role: "admin",
203
+ save() {},
196
204
  destroy() {
197
205
  destroyed = true;
198
206
  },
@@ -210,6 +218,7 @@ module.exports = ({ expect }) => {
210
218
  session: {
211
219
  user: id,
212
220
  role: "admin",
221
+ save() {},
213
222
  },
214
223
  };
215
224
  new Provider(t).cleanse();
@@ -22,7 +22,7 @@ function stubReqWithTokenContent({ tokenContent, secret }) {
22
22
  }
23
23
 
24
24
  module.exports = ({ expect }) => {
25
- describe(`${Provider.constructor.name}`, () => {
25
+ describe(`${Provider.name}`, () => {
26
26
  /* describe("isUser", function () {
27
27
  it("check if user exists - true", function () {
28
28
  var t = {
@@ -1,36 +1,34 @@
1
- const ADDS = require('../../src/init/additional');
1
+ const ADDS = require("../../src/init/additional");
2
2
 
3
- module.exports = ({expect})=>{
4
-
5
- describe('Addtional', ()=>{
6
- it('init/run', async ()=>{
7
- ADDS.init(5);
8
- const res = await ADDS.run('m', 'asd');
9
- expect(res).to.be.undefined;
10
- ADDS.init({
11
- m(){
12
- return Array.from(arguments).join('.');
13
- },
14
- async t(){
15
- return Array.from(arguments).join('.');
16
- },
17
- obj:{
18
- data:{
19
- collection:{
20
- runnable(){
21
- return 'executed';
22
- }
23
- }
24
- }
25
- }
26
- });
27
- const res1 = await ADDS.run('m', 'asd');
28
- expect(res1).to.be.equal('asd');
29
- const res2 = await ADDS.run('t', 'sd');
30
- expect(res2).to.be.equal('sd');
31
- const res3 = await ADDS.run('obj.data.collection.runnable');
32
- expect(res3).to.be.equal('executed');
3
+ module.exports = ({ expect }) => {
4
+ describe("Addtional", () => {
5
+ it("init/run", async () => {
6
+ ADDS.init(5);
7
+ const res = await ADDS.run("m", "asd");
8
+ expect(res).to.be.undefined;
9
+ ADDS.init({
10
+ m() {
11
+ return Array.from(arguments).join(".");
12
+ },
13
+ async t() {
14
+ return Array.from(arguments).join(".");
15
+ },
16
+ obj: {
17
+ data: {
18
+ collection: {
19
+ runnable() {
20
+ return "executed";
21
+ },
22
+ },
23
+ },
24
+ },
25
+ });
26
+ const res1 = await ADDS.run("m", "asd");
27
+ expect(res1).to.be.equal("asd");
28
+ const res2 = await ADDS.run("t", "sd");
29
+ expect(res2).to.be.equal("sd");
30
+ const res3 = await ADDS.run("obj.data.collection.runnable");
31
+ expect(res3).to.be.equal("executed");
32
+ });
33
33
  });
34
- });
35
-
36
34
  };
package/test/init/app.js CHANGED
@@ -1,10 +1,20 @@
1
+ const path = require("node:path");
1
2
  const ADDS = require("../../src/init/additional");
2
3
  const InitApp = require("../../src/init/lib/app");
3
-
4
+ const createFakeEmit = (val, err) => {
5
+ return async () => {
6
+ if (err) {
7
+ throw err;
8
+ } else {
9
+ return val;
10
+ }
11
+ };
12
+ };
4
13
  module.exports = ({ expect }) => {
5
14
  describe("App", () => {
6
15
  describe("createApp", () => {
7
16
  it("not emits to call", async () => {
17
+ const fEmit = createFakeEmit();
8
18
  let constructorCalled = false;
9
19
  const fakeMongoose = {
10
20
  this: "is fake indeed",
@@ -27,7 +37,12 @@ module.exports = ({ expect }) => {
27
37
  },
28
38
  };
29
39
 
30
- await InitApp.createApp({ master, config, options });
40
+ await InitApp.createApp({
41
+ master,
42
+ config,
43
+ options,
44
+ emit: fEmit,
45
+ });
31
46
  expect(constructorCalled).to.be.true;
32
47
  });
33
48
 
@@ -68,7 +83,12 @@ module.exports = ({ expect }) => {
68
83
  },
69
84
  };
70
85
 
71
- await InitApp.createApp({ master, config, options });
86
+ await InitApp.createApp({
87
+ master,
88
+ config,
89
+ options,
90
+ emit: ADDS.run.bind(ADDS),
91
+ });
72
92
  expect(constructorCalled).to.be.true;
73
93
  expect(preCalled).to.be.true;
74
94
  expect(postCalled).to.be.true;
@@ -114,7 +134,12 @@ module.exports = ({ expect }) => {
114
134
  setEnv() {},
115
135
  };
116
136
 
117
- await InitApp.setAppEnvs({ master, config, options });
137
+ await InitApp.setAppEnvs({
138
+ master,
139
+ config,
140
+ options,
141
+ emit: ADDS.run.bind(ADDS),
142
+ });
118
143
 
119
144
  expect(preCalled).to.be.true;
120
145
  expect(postCalled).to.be.true;
@@ -173,7 +198,12 @@ module.exports = ({ expect }) => {
173
198
  },
174
199
  };
175
200
 
176
- await InitApp.importModules({ master, config, options });
201
+ await InitApp.importModules({
202
+ master,
203
+ config,
204
+ options,
205
+ emit: ADDS.run.bind(ADDS),
206
+ });
177
207
 
178
208
  expect(preCalled).to.be.true;
179
209
  expect(postCalled).to.be.true;
@@ -218,7 +248,12 @@ module.exports = ({ expect }) => {
218
248
  return fakeManifest;
219
249
  },
220
250
  };
221
- await InitApp.importModules({ master, config, options });
251
+ await InitApp.importModules({
252
+ master,
253
+ config,
254
+ options,
255
+ emit: ADDS.run.bind(ADDS),
256
+ });
222
257
  expect(preCalled).to.be.true;
223
258
  expect(postCalled).to.be.true;
224
259
  });
@@ -226,6 +261,7 @@ module.exports = ({ expect }) => {
226
261
 
227
262
  describe("createReporter", () => {
228
263
  it("ok", async () => {
264
+ const fEmit = createFakeEmit();
229
265
  let reporterConstructed = false;
230
266
  class FakeReporter {
231
267
  constructor(opts) {
@@ -247,7 +283,12 @@ module.exports = ({ expect }) => {
247
283
  return fakeManifest;
248
284
  },
249
285
  };
250
- await InitApp.createReporter({ master, config, options });
286
+ await InitApp.createReporter({
287
+ master,
288
+ config,
289
+ options,
290
+ emit: fEmit,
291
+ });
251
292
  expect(reporterConstructed).to.be.true;
252
293
  });
253
294
 
@@ -335,7 +376,17 @@ module.exports = ({ expect }) => {
335
376
  expect(modsPath).to.be.equal("modulesPath_fake");
336
377
  },
337
378
  importModuleFrom(modPath, modName) {
338
- expect(modPath).to.be.equal("npmPath_fake/" + modName);
379
+ console.log(
380
+ path.resolve("src/core"),
381
+ path.resolve("npmPath_fake/" + modName)
382
+ );
383
+ console.log(modPath, modName);
384
+ expect(
385
+ [
386
+ path.resolve("src/core"),
387
+ path.resolve("npmPath_fake/" + modName),
388
+ ].includes(path.resolve(modPath))
389
+ ).to.be.true;
339
390
  },
340
391
  };
341
392
  const master = {
@@ -357,12 +408,17 @@ module.exports = ({ expect }) => {
357
408
  },
358
409
  };
359
410
  try {
360
- await new InitApp().run({ master, config, options });
411
+ await new InitApp().run({
412
+ master,
413
+ config,
414
+ options,
415
+ emit: ADDS.run.bind(ADDS),
416
+ });
361
417
  } catch (e) {
418
+ expect(e.message).to.be.equal("Post throwed");
362
419
  expect(constructorCalled).to.be.true;
363
420
  expect(preCalled).to.be.true;
364
421
  expect(postCalled).to.be.true;
365
- expect(e.message).to.be.equal("Post throwed");
366
422
  }
367
423
  });
368
424
  });
@@ -29,7 +29,10 @@ module.exports = ({ expect }) => {
29
29
  };
30
30
  },
31
31
  };
32
- await new InitBodyparser().run({ master });
32
+ await new InitBodyparser().run({
33
+ master,
34
+ emit: require("../fakes").createFakeEmit(),
35
+ });
33
36
  expect(useCalled).to.be.true;
34
37
  expect(middlewareGeneratorCalled).to.be.equal(2);
35
38
  });
@@ -21,7 +21,10 @@ module.exports = ({ expect }) => {
21
21
  };
22
22
  },
23
23
  };
24
- await new InitCompression().run({ master });
24
+ await new InitCompression().run({
25
+ emit: require("../fakes").createFakeEmit(),
26
+ master,
27
+ });
25
28
  expect(useCalled).to.be.true;
26
29
  expect(compressionCalled).to.be.true;
27
30
  });
package/test/init/cors.js CHANGED
@@ -38,7 +38,11 @@ module.exports = ({ expect }) => {
38
38
  };
39
39
  },
40
40
  };
41
- await new InitCORS().run({ config, master });
41
+ await new InitCORS().run({
42
+ config,
43
+ master,
44
+ emit: require("../fakes").createFakeEmit(),
45
+ });
42
46
  expect(mdSet).to.be.equal(true);
43
47
  });
44
48
  });
package/test/init/csp.js CHANGED
@@ -1,3 +1,3 @@
1
- module.exports = ({expect})=>{
2
- describe('CSP', ()=>{});
1
+ module.exports = ({ expect }) => {
2
+ describe("CSP", () => {});
3
3
  };
package/test/init/db.js CHANGED
@@ -51,7 +51,11 @@ module.exports = ({ expect }) => {
51
51
  expect(itm.fakeMongoose).to.be.true;
52
52
  },
53
53
  };
54
- await new InitDB().run({ config, master });
54
+ await new InitDB().run({
55
+ emit: require("../fakes").createFakeEmit(),
56
+ config,
57
+ master,
58
+ });
55
59
  });
56
60
  });
57
61
  after(() => {
package/test/init/env.js CHANGED
@@ -89,7 +89,12 @@ module.exports = ({ expect }) => {
89
89
  },
90
90
  set() {},
91
91
  };
92
- await new InitEnv().run({ master, options, config });
92
+ await new InitEnv().run({
93
+ master,
94
+ options,
95
+ config,
96
+ emit: require("../fakes").createFakeEmit(),
97
+ });
93
98
  });
94
99
 
95
100
  it("path:ws - not empty", async () => {
@@ -114,7 +119,12 @@ module.exports = ({ expect }) => {
114
119
  },
115
120
  set() {},
116
121
  };
117
- await new InitEnv().run({ master, options, config });
122
+ await new InitEnv().run({
123
+ master,
124
+ options,
125
+ config,
126
+ emit: require("../fakes").createFakeEmit(),
127
+ });
118
128
  });
119
129
  });
120
130
  });
@@ -44,7 +44,10 @@ module.exports = ({ expect }) => {
44
44
  return this._server;
45
45
  },
46
46
  };
47
- await new InitExpress().run({ master });
47
+ await new InitExpress().run({
48
+ emit: require("../fakes").createFakeEmit(),
49
+ master,
50
+ });
48
51
  expect(nextCalled).to.be.true;
49
52
  });
50
53
  });
@@ -22,7 +22,10 @@ module.exports = ({ expect }) => {
22
22
  };
23
23
  },
24
24
  };
25
- await new InitFileupload().run({ master });
25
+ await new InitFileupload().run({
26
+ emit: require("../fakes").createFakeEmit(),
27
+ master,
28
+ });
26
29
  expect(useCalled).to.be.true;
27
30
  expect(middlewareGeneratorCalled).to.be.true;
28
31
  });
package/test/init/http.js CHANGED
@@ -25,7 +25,14 @@ module.exports = ({ expect }) => {
25
25
  },
26
26
  };
27
27
  InitHTTP.prototype.listenPromise
28
- .call({}, { config, master })
28
+ .call(
29
+ {},
30
+ {
31
+ emit: require("../fakes").createFakeEmit(),
32
+ config,
33
+ master,
34
+ }
35
+ )
29
36
  .then(() => {
30
37
  done();
31
38
  })
@@ -55,7 +62,11 @@ module.exports = ({ expect }) => {
55
62
  try {
56
63
  await InitHTTP.prototype.listenPromise.call(
57
64
  {},
58
- { config, master }
65
+ {
66
+ emit: require("../fakes").createFakeEmit(),
67
+ config,
68
+ master,
69
+ }
59
70
  );
60
71
  } catch (e) {
61
72
  expect(e).to.be.instanceof(Error);
@@ -134,7 +145,10 @@ module.exports = ({ expect }) => {
134
145
  }[str];
135
146
  },
136
147
  };
137
- await InitHTTP.prototype.run.call(ctx, { config });
148
+ await InitHTTP.prototype.run.call(ctx, {
149
+ emit: require("../fakes").createFakeEmit(),
150
+ config,
151
+ });
138
152
  expect(runnerCalled).to.be.true;
139
153
  });
140
154
 
@@ -153,7 +167,10 @@ module.exports = ({ expect }) => {
153
167
  }[str];
154
168
  },
155
169
  };
156
- await InitHTTP.prototype.run.call(ctx, { config });
170
+ await InitHTTP.prototype.run.call(ctx, {
171
+ emit: require("../fakes").createFakeEmit(),
172
+ config,
173
+ });
157
174
  expect(runnerCalled).to.be.true;
158
175
  });
159
176
  });
@@ -1,10 +1,19 @@
1
1
  const InitMiddleware = require("../../src/init/lib/middleware");
2
2
  const mock = require("mock-require");
3
-
3
+ const createFakeEmit = (val, err) => {
4
+ return async () => {
5
+ if (err) {
6
+ throw err;
7
+ } else {
8
+ return val;
9
+ }
10
+ };
11
+ };
4
12
  module.exports = ({ expect }) => {
5
13
  describe("Middleware", () => {
6
14
  describe("run", () => {
7
15
  it("config middleware empty", async () => {
16
+ const fEmit = createFakeEmit();
8
17
  const config = {
9
18
  get() {
10
19
  return false;
@@ -12,6 +21,7 @@ module.exports = ({ expect }) => {
12
21
  };
13
22
  await new InitMiddleware().run({
14
23
  config,
24
+ emit: fEmit,
15
25
  });
16
26
  });
17
27
 
@@ -30,6 +40,7 @@ module.exports = ({ expect }) => {
30
40
  });
31
41
 
32
42
  it("config middleware not empty", async () => {
43
+ const fEmit = createFakeEmit();
33
44
  const config = {
34
45
  get() {
35
46
  return {
@@ -56,6 +67,7 @@ module.exports = ({ expect }) => {
56
67
  await new InitMiddleware().run({
57
68
  config,
58
69
  master,
70
+ emit: fEmit,
59
71
  });
60
72
  });
61
73
  });
@@ -168,6 +168,7 @@ module.exports = ({ expect }) => {
168
168
  expose(ser) {
169
169
  expect(ser).to.be.deep.equal(fakeServer);
170
170
  },
171
+ async execInModules() {},
171
172
  };
172
173
  mock("main-not-app-routes", (ser, app) => {
173
174
  expect(ser).to.be.deep.equal(fakeServer);
@@ -52,7 +52,11 @@ module.exports = ({ expect }) => {
52
52
  };
53
53
  },
54
54
  };
55
- await new InitSessionsMongo().run({ master, config });
55
+ await new InitSessionsMongo().run({
56
+ master,
57
+ config,
58
+ emit: require("../../fakes").createFakeEmit(),
59
+ });
56
60
  expect(events.sort()).to.be.deep.equal(
57
61
  ["error", "connected"].sort()
58
62
  );
@@ -58,7 +58,11 @@ module.exports = ({ expect }) => {
58
58
  };
59
59
  },
60
60
  };
61
- await new InitSessionsRedis().run({ master, config });
61
+ await new InitSessionsRedis().run({
62
+ master,
63
+ config,
64
+ emit: require("../../fakes").createFakeEmit(),
65
+ });
62
66
  });
63
67
  });
64
68
  });
@@ -1,5 +1,14 @@
1
1
  const InitSessions = require("../../src/init/lib/sessions");
2
2
  const mock = require("mock-require");
3
+ const createFakeEmit = (val, err) => {
4
+ return async () => {
5
+ if (err) {
6
+ throw err;
7
+ } else {
8
+ return val;
9
+ }
10
+ };
11
+ };
3
12
 
4
13
  module.exports = ({ expect }) => {
5
14
  describe("Sessions", () => {
@@ -31,19 +40,7 @@ module.exports = ({ expect }) => {
31
40
 
32
41
  describe("run", () => {
33
42
  it("driver loaded ok", async () => {
34
- let constRunned = false;
35
- let runRunned = false;
36
- mock(
37
- "../../src/init/sessions/redis.js",
38
- class A {
39
- constructor() {
40
- constRunned = true;
41
- }
42
- async run() {
43
- runRunned = true;
44
- }
45
- }
46
- );
43
+ const fEmit = createFakeEmit();
47
44
  const config = {
48
45
  get() {
49
46
  return {
@@ -52,13 +49,21 @@ module.exports = ({ expect }) => {
52
49
  },
53
50
  };
54
51
  await new InitSessions().run({
52
+ emit: fEmit,
55
53
  config,
54
+ master: {
55
+ getEnv() {
56
+ return {};
57
+ },
58
+ getServer() {
59
+ return { use() {} };
60
+ },
61
+ },
56
62
  });
57
- expect(constRunned).to.be.true;
58
- expect(runRunned).to.be.true;
59
63
  });
60
64
 
61
65
  it("driver loaded, but not class", async () => {
66
+ const fEmit = createFakeEmit();
62
67
  try {
63
68
  mock("../../src/init/sessions/mongo.js", 2);
64
69
  const config = {
@@ -69,6 +74,7 @@ module.exports = ({ expect }) => {
69
74
  },
70
75
  };
71
76
  await new InitSessions().run({
77
+ emit: fEmit,
72
78
  config,
73
79
  });
74
80
  } catch (e) {
@@ -114,7 +114,10 @@ module.exports = ({ expect }) => {
114
114
  };
115
115
  },
116
116
  };
117
- await new InitStatic().run({ master });
117
+ await new InitStatic().run({
118
+ emit: require("../fakes").createFakeEmit(),
119
+ master,
120
+ });
118
121
  });
119
122
  });
120
123
  });