mythix 2.7.0 → 2.7.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mythix",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "Mythix is a NodeJS web-app framework",
5
5
  "main": "src/index",
6
6
  "scripts": {
@@ -64,18 +64,6 @@ function createTestApplication(ApplicationClass) {
64
64
  return defaultModules;
65
65
  }
66
66
 
67
- createDatabaseConnection() {
68
- const NOOP = () => {};
69
-
70
- return {
71
- isStarted: () => true,
72
- start: NOOP,
73
- stop: NOOP,
74
- registerModels: NOOP,
75
- getModels: () => ({}),
76
- };
77
- }
78
-
79
67
  constructor(_opts) {
80
68
  let opts = Nife.extend(true, {
81
69
  environment: 'test',
@@ -97,6 +85,20 @@ function createTestApplication(ApplicationClass) {
97
85
  value: new HTTPInterface(),
98
86
  },
99
87
  });
88
+
89
+ if (!this.createDatabaseConnection) {
90
+ this.createDatabaseConnection = (function createDatabaseConnection() {
91
+ const NOOP = () => {};
92
+
93
+ return {
94
+ isStarted: () => true,
95
+ start: NOOP,
96
+ stop: NOOP,
97
+ registerModels: NOOP,
98
+ getModels: () => ({}),
99
+ };
100
+ }).bind(this);
101
+ }
100
102
  }
101
103
 
102
104
  getTestingLoggerConfig(loggerOpts) {