@sprucelabs/spruce-test-fixtures 45.0.1 → 45.1.0
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.
|
@@ -5,6 +5,7 @@ export default class StoreFixture {
|
|
|
5
5
|
private static storeMap;
|
|
6
6
|
private static shouldAutomaticallyResetDatabase;
|
|
7
7
|
static setStore(name: StoreName, Class: any): void;
|
|
8
|
+
getStore<N extends StoreName>(name: N): Promise<StoreMap[N]>;
|
|
8
9
|
Store<N extends StoreName, O extends StoreOptions<N>>(name: N, options?: O): Promise<StoreMap[N]>;
|
|
9
10
|
getStoreFactory(): Promise<StoreFactory>;
|
|
10
11
|
static setShouldAutomaticallyResetDatabase(shouldReset: boolean): void;
|
|
@@ -13,6 +13,12 @@ export default class StoreFixture {
|
|
|
13
13
|
static setStore(name, Class) {
|
|
14
14
|
this.storeMap[name] = Class;
|
|
15
15
|
}
|
|
16
|
+
getStore(name) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const factory = yield this.getStoreFactory();
|
|
19
|
+
return factory.getStore(name);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
16
22
|
Store(name, options) {
|
|
17
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
24
|
const factory = yield this.getStoreFactory();
|
|
@@ -5,6 +5,7 @@ export default class StoreFixture {
|
|
|
5
5
|
private static storeMap;
|
|
6
6
|
private static shouldAutomaticallyResetDatabase;
|
|
7
7
|
static setStore(name: StoreName, Class: any): void;
|
|
8
|
+
getStore<N extends StoreName>(name: N): Promise<StoreMap[N]>;
|
|
8
9
|
Store<N extends StoreName, O extends StoreOptions<N>>(name: N, options?: O): Promise<StoreMap[N]>;
|
|
9
10
|
getStoreFactory(): Promise<StoreFactory>;
|
|
10
11
|
static setShouldAutomaticallyResetDatabase(shouldReset: boolean): void;
|
|
@@ -6,6 +6,10 @@ class StoreFixture {
|
|
|
6
6
|
static setStore(name, Class) {
|
|
7
7
|
this.storeMap[name] = Class;
|
|
8
8
|
}
|
|
9
|
+
async getStore(name) {
|
|
10
|
+
const factory = await this.getStoreFactory();
|
|
11
|
+
return factory.getStore(name);
|
|
12
|
+
}
|
|
9
13
|
async Store(name, options) {
|
|
10
14
|
const factory = await this.getStoreFactory();
|
|
11
15
|
return factory.Store(name, options);
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@sprucelabs/spruce-test-fixtures"
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
"version": "45.0
|
|
16
|
+
"version": "45.1.0",
|
|
17
17
|
"files": [
|
|
18
18
|
"build/**/*",
|
|
19
19
|
"!build/__tests__",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@sprucelabs/schema": "^28.4.2",
|
|
72
72
|
"@sprucelabs/spruce-core-schemas": "^34.2.29",
|
|
73
73
|
"@sprucelabs/spruce-event-utils": "^27.0.89",
|
|
74
|
-
"@sprucelabs/spruce-skill-booter": "^45.0
|
|
74
|
+
"@sprucelabs/spruce-skill-booter": "^45.1.0",
|
|
75
75
|
"@sprucelabs/spruce-skill-utils": "^26.3.21",
|
|
76
76
|
"dotenv": "^16.0.1",
|
|
77
77
|
"unique-names-generator": "^4.7.1"
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
]
|
|
132
132
|
]
|
|
133
133
|
},
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "4292d4760aba6b256eb1000af9048340a9cea5f3"
|
|
135
135
|
}
|