@cslug/testing 0.4.1 → 0.5.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 +15 -15
- package/src/fakes.ts +4 -0
- package/src/peers.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cslug/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Test kit: testApp(), HTTP and HTML assertions, database isolation, fakes, time travel.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
"bun": ">=1.3.14"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@cslug/core": "0.
|
|
32
|
-
"@cslug/validation": "0.
|
|
33
|
-
"@cslug/http": "0.
|
|
34
|
-
"@cslug/vue": "0.
|
|
35
|
-
"@cslug/database": "0.
|
|
36
|
-
"@cslug/redis": "0.
|
|
37
|
-
"@cslug/queue": "0.
|
|
38
|
-
"@cslug/auth": "0.
|
|
39
|
-
"@cslug/mail": "0.
|
|
40
|
-
"@cslug/notification": "0.
|
|
41
|
-
"@cslug/storage": "0.
|
|
42
|
-
"@cslug/webhook": "0.
|
|
43
|
-
"@cslug/ai": "0.
|
|
44
|
-
"@cslug/cli": "0.
|
|
31
|
+
"@cslug/core": "0.5.0",
|
|
32
|
+
"@cslug/validation": "0.5.0",
|
|
33
|
+
"@cslug/http": "0.5.0",
|
|
34
|
+
"@cslug/vue": "0.5.0",
|
|
35
|
+
"@cslug/database": "0.5.0",
|
|
36
|
+
"@cslug/redis": "0.5.0",
|
|
37
|
+
"@cslug/queue": "0.5.0",
|
|
38
|
+
"@cslug/auth": "0.5.0",
|
|
39
|
+
"@cslug/mail": "0.5.0",
|
|
40
|
+
"@cslug/notification": "0.5.0",
|
|
41
|
+
"@cslug/storage": "0.5.0",
|
|
42
|
+
"@cslug/webhook": "0.5.0",
|
|
43
|
+
"@cslug/ai": "0.5.0",
|
|
44
|
+
"@cslug/cli": "0.5.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"@cslug/validation": {
|
package/src/fakes.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { expect } from 'bun:test'
|
|
2
2
|
import { type AnyEventClass, type Application, EventBus, type EventClass, Logger } from '@cslug/core'
|
|
3
3
|
import type {
|
|
4
|
+
AiFake,
|
|
5
|
+
AiModule,
|
|
4
6
|
MailFake,
|
|
5
7
|
MailModule,
|
|
6
8
|
NotificationFake,
|
|
@@ -36,6 +38,7 @@ const lazy: Record<string, () => Promise<FakeInstaller>> = {
|
|
|
36
38
|
mail: async () => (await importOptional<MailModule>('@cslug/mail')).installMailFake,
|
|
37
39
|
storage: async () => (await importOptional<StorageModule>('@cslug/storage')).installStorageFake,
|
|
38
40
|
notify: async () => (await importOptional<NotificationModule>('@cslug/notification')).installNotificationFake,
|
|
41
|
+
ai: async () => (await importOptional<AiModule>('@cslug/ai')).installAiFake,
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
/** The installer for `name`: registered, or loaded from its package. Undefined if neither. */
|
|
@@ -100,5 +103,6 @@ declare module './fakes' {
|
|
|
100
103
|
mail: MailFake
|
|
101
104
|
storage: StorageFake
|
|
102
105
|
notify: NotificationFake
|
|
106
|
+
ai: AiFake
|
|
103
107
|
}
|
|
104
108
|
}
|
package/src/peers.d.ts
CHANGED
|
@@ -14,3 +14,5 @@ export type ScheduleRun = import('@cslug/queue').ScheduleRun
|
|
|
14
14
|
export type MailFake = import('@cslug/mail').MailFake
|
|
15
15
|
export type StorageFake = import('@cslug/storage').StorageFake
|
|
16
16
|
export type NotificationFake = import('@cslug/notification').NotificationFake
|
|
17
|
+
export type AiModule = typeof import('@cslug/ai')
|
|
18
|
+
export type AiFake = import('@cslug/ai').AiFake
|