@storecraft/database-planetscale 1.2.5 → 1.3.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.
- package/package.json +1 -1
- package/tests/runner.test.js +6 -8
package/package.json
CHANGED
package/tests/runner.test.js
CHANGED
@@ -7,7 +7,7 @@ import { migrateToLatest } from '@storecraft/database-planetscale/migrate.js';
|
|
7
7
|
|
8
8
|
export const create_app = async () => {
|
9
9
|
|
10
|
-
|
10
|
+
return new App(
|
11
11
|
{
|
12
12
|
auth_admins_emails: ['admin@sc.com'],
|
13
13
|
auth_secret_access_token: 'auth_secret_access_token',
|
@@ -22,23 +22,21 @@ export const create_app = async () => {
|
|
22
22
|
useSharedConnection: true
|
23
23
|
}
|
24
24
|
)
|
25
|
-
)
|
26
|
-
|
27
|
-
return app.init();
|
25
|
+
).init();
|
28
26
|
}
|
29
27
|
|
30
28
|
async function test() {
|
31
29
|
const app = await create_app();
|
32
30
|
|
33
|
-
await migrateToLatest(app.db, false);
|
31
|
+
await migrateToLatest(app._.db, false);
|
34
32
|
|
35
33
|
Object.entries(api).slice(0, -1).forEach(
|
36
34
|
([name, runner]) => {
|
37
|
-
runner.create(app).run();
|
35
|
+
runner.create(app._.app).run();
|
38
36
|
}
|
39
37
|
);
|
40
|
-
const last_test = Object.values(api).at(-1).create(app);
|
41
|
-
last_test.after(async ()=>{app.
|
38
|
+
const last_test = Object.values(api).at(-1).create(app._.app);
|
39
|
+
last_test.after(async ()=>{app._.disconnect()});
|
42
40
|
last_test.run();
|
43
41
|
}
|
44
42
|
|