@strav/testing 0.3.33 → 0.4.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 +5 -5
- package/src/test_case.ts +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strav/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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.
|
|
19
|
-
"@strav/http": "0.
|
|
20
|
-
"@strav/view": "0.
|
|
21
|
-
"@strav/database": "0.
|
|
18
|
+
"@strav/kernel": "0.4.0",
|
|
19
|
+
"@strav/http": "0.4.0",
|
|
20
|
+
"@strav/view": "0.4.0",
|
|
21
|
+
"@strav/database": "0.4.0"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"test": "bun test tests/",
|
package/src/test_case.ts
CHANGED
|
@@ -148,8 +148,8 @@ export class TestCase {
|
|
|
148
148
|
|
|
149
149
|
// Monkey-patch Database to use the reserved connection.
|
|
150
150
|
// TypeScript `private` is compile-time only — runtime access works.
|
|
151
|
-
;(this.db as any).
|
|
152
|
-
;(Database as any).
|
|
151
|
+
;(this.db as any).appConnection = this._reserved
|
|
152
|
+
;(Database as any)._appConnection = this._reserved
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -160,8 +160,8 @@ export class TestCase {
|
|
|
160
160
|
this._reserved.release()
|
|
161
161
|
|
|
162
162
|
// Restore original connection
|
|
163
|
-
;(this.db as any).
|
|
164
|
-
;(Database as any).
|
|
163
|
+
;(this.db as any).appConnection = this._originalSql
|
|
164
|
+
;(Database as any)._appConnection = this._originalSql
|
|
165
165
|
this._reserved = null
|
|
166
166
|
this._originalSql = null
|
|
167
167
|
}
|