@devvit/test 0.12.6-next-2025-12-11-00-01-42-4d43dd38d.0 → 0.12.6-next-2025-12-11-16-58-10-b6fe687e3.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/test",
|
|
3
|
-
"version": "0.12.6-next-2025-12-11-
|
|
3
|
+
"version": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,15 +35,16 @@
|
|
|
35
35
|
"test:unit-with-coverage": "vitest run --coverage"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@devvit/media": "0.12.6-next-2025-12-11-
|
|
39
|
-
"@devvit/
|
|
40
|
-
"@devvit/
|
|
41
|
-
"@devvit/
|
|
42
|
-
"@devvit/
|
|
43
|
-
"@devvit/
|
|
44
|
-
"@devvit/
|
|
45
|
-
"@devvit/
|
|
46
|
-
"@devvit/
|
|
38
|
+
"@devvit/media": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
39
|
+
"@devvit/notifications": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
40
|
+
"@devvit/protos": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
41
|
+
"@devvit/realtime": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
42
|
+
"@devvit/reddit": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
43
|
+
"@devvit/redis": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
44
|
+
"@devvit/scheduler": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
45
|
+
"@devvit/server": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
46
|
+
"@devvit/settings": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
47
|
+
"@devvit/shared-types": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
47
48
|
"ioredis": "5.7.0",
|
|
48
49
|
"redis-memory-server": "0.12.1"
|
|
49
50
|
},
|
|
@@ -51,11 +52,11 @@
|
|
|
51
52
|
"vitest": "*"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
|
-
"@devvit/repo-tools": "0.12.6-next-2025-12-11-
|
|
55
|
-
"@devvit/tsconfig": "0.12.6-next-2025-12-11-
|
|
55
|
+
"@devvit/repo-tools": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
56
|
+
"@devvit/tsconfig": "0.12.6-next-2025-12-11-16-58-10-b6fe687e3.0",
|
|
56
57
|
"eslint": "9.11.1",
|
|
57
58
|
"typescript": "5.8.3",
|
|
58
59
|
"vitest": "1.6.1"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "65f8cb0ff33ab20c778c128b130b4f087a2bc961"
|
|
61
62
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@devvit/shared-types/polyfill/fetch.polyfill.js';
|
|
2
2
|
import { MediaMock } from '@devvit/media/test';
|
|
3
|
+
import { NotificationsMock } from '@devvit/notifications/test';
|
|
3
4
|
import { RealtimeMock } from '@devvit/realtime/server/test';
|
|
4
5
|
import { RedditPluginMock } from '@devvit/reddit/test';
|
|
5
6
|
import { RedisMock } from '@devvit/redis/test';
|
|
@@ -61,6 +62,7 @@ export type DevvitFixtures = {
|
|
|
61
62
|
realtime: RealtimeMock;
|
|
62
63
|
settings: SettingsMock;
|
|
63
64
|
scheduler: SchedulerMock;
|
|
65
|
+
notifications: NotificationsMock;
|
|
64
66
|
};
|
|
65
67
|
};
|
|
66
68
|
export type DevvitTestConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devvitTest.d.ts","sourceRoot":"","sources":["../../../src/server/vitest/devvitTest.ts"],"names":[],"mappings":"AAAA,OAAO,iDAAiD,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"devvitTest.d.ts","sourceRoot":"","sources":["../../../src/server/vitest/devvitTest.ts"],"names":[],"mappings":"AAAA,OAAO,iDAAiD,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAQ/D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAMhF,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,QAAQ,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAKrD,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE;SAAG,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;IAEtC;;;OAGG;IACH,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,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vit/notifications/test';
|
|
3
4
|
import { SchedulerDefinition } from '@devvit/protos';
|
|
4
5
|
import { RealtimeDefinition } from '@devvit/protos/types/devvit/events/v1alpha/realtime.js';
|
|
5
6
|
import { HTTPDefinition } from '@devvit/protos/types/devvit/plugin/http/http.js';
|
|
6
7
|
import { MediaServiceDefinition } from '@devvit/protos/types/devvit/plugin/media/media.js';
|
|
8
|
+
import { NotificationsDefinition } from '@devvit/protos/types/devvit/plugin/notifications/notifications_svc.js';
|
|
7
9
|
import { RedisAPIDefinition } from '@devvit/protos/types/devvit/plugin/redis/redisapi.js';
|
|
8
10
|
import { SettingsDefinition } from '@devvit/protos/types/devvit/plugin/settings/v1alpha/settings.js';
|
|
9
11
|
import { RealtimeMock } from '@devvit/realtime/server/test';
|
|
@@ -100,6 +102,7 @@ const setup = (config) => {
|
|
|
100
102
|
const realtimeMock = new RealtimeMock();
|
|
101
103
|
const settingsMock = new SettingsMock(settings);
|
|
102
104
|
const schedulerMock = new SchedulerMock();
|
|
105
|
+
const notificationsMock = new NotificationsMock();
|
|
103
106
|
// Seed default context data so helpers like getCurrentUser/subreddit work.
|
|
104
107
|
redditMock.addUser({ id: userId, name: username });
|
|
105
108
|
redditMock.addSubreddit({ id: subredditId, displayName: subredditName, title: subredditName });
|
|
@@ -111,6 +114,7 @@ const setup = (config) => {
|
|
|
111
114
|
[RealtimeDefinition.fullName]: realtimeMock.plugin,
|
|
112
115
|
[SettingsDefinition.fullName]: settingsMock.plugin,
|
|
113
116
|
[SchedulerDefinition.fullName]: schedulerMock.plugin,
|
|
117
|
+
[NotificationsDefinition.fullName]: notificationsMock.plugin,
|
|
114
118
|
...redditMock.getPluginRegistrations(),
|
|
115
119
|
},
|
|
116
120
|
});
|
|
@@ -132,6 +136,7 @@ const setup = (config) => {
|
|
|
132
136
|
realtime: realtimeMock,
|
|
133
137
|
settings: settingsMock,
|
|
134
138
|
scheduler: schedulerMock,
|
|
139
|
+
notifications: notificationsMock,
|
|
135
140
|
},
|
|
136
141
|
};
|
|
137
142
|
return { reqCtx, fixtures, testContext: { config: cfg, appConfig: contextAppConfig } };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devvitTest.notifications.test.d.ts","sourceRoot":"","sources":["../../../src/server/vitest/devvitTest.notifications.test.ts"],"names":[],"mappings":""}
|