@strav/testing 0.3.22 → 0.3.24

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 (2) hide show
  1. package/package.json +5 -5
  2. package/src/test_case.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/testing",
3
- "version": "0.3.22",
3
+ "version": "0.3.24",
4
4
  "type": "module",
5
5
  "description": "Testing utilities for the Strav framework",
6
6
  "license": "MIT",
@@ -15,10 +15,10 @@
15
15
  "CHANGELOG.md"
16
16
  ],
17
17
  "peerDependencies": {
18
- "@strav/kernel": "0.3.22",
19
- "@strav/http": "0.3.22",
20
- "@strav/view": "0.3.22",
21
- "@strav/database": "0.3.22"
18
+ "@strav/kernel": "0.3.24",
19
+ "@strav/http": "0.3.24",
20
+ "@strav/view": "0.3.24",
21
+ "@strav/database": "0.3.24"
22
22
  },
23
23
  "scripts": {
24
24
  "test": "bun test tests/",
package/src/test_case.ts CHANGED
@@ -81,12 +81,16 @@ export class TestCase {
81
81
  if (this.options.auth) {
82
82
  const { SessionManager } = await import('@strav/http')
83
83
  const { Auth } = await import('@strav/http')
84
+ const { PostgresSessionStore } = await import('@strav/database')
84
85
 
85
86
  if (!app.has(SessionManager)) app.singleton(SessionManager)
86
87
  if (!app.has(Auth)) app.singleton(Auth)
88
+ if (!app.has(PostgresSessionStore)) app.singleton(PostgresSessionStore)
87
89
 
88
90
  app.resolve(SessionManager)
89
- await SessionManager.ensureTable()
91
+ const sessionStore = app.resolve(PostgresSessionStore)
92
+ SessionManager.useStore(sessionStore)
93
+ await sessionStore.ensureSchema()
90
94
 
91
95
  app.resolve(Auth)
92
96
  await Auth.ensureTables()