@quenty/nevermore-cli 4.41.1 → 4.42.1-canary.783.30683193716.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/CHANGELOG.md +28 -0
- package/dist/args/global-args.d.ts +13 -0
- package/dist/args/global-args.d.ts.map +1 -1
- package/dist/commands/batch-command/batch-deploy-command.d.ts +3 -0
- package/dist/commands/batch-command/batch-deploy-command.d.ts.map +1 -1
- package/dist/commands/batch-command/batch-deploy-command.js +90 -1
- package/dist/commands/batch-command/batch-deploy-command.js.map +1 -1
- package/dist/commands/batch-command/batch-test-command.d.ts.map +1 -1
- package/dist/commands/batch-command/batch-test-command.js +25 -4
- package/dist/commands/batch-command/batch-test-command.js.map +1 -1
- package/dist/commands/deploy-command/deploy-init.js +1 -1
- package/dist/commands/deploy-command/deploy-init.js.map +1 -1
- package/dist/commands/deploy-command/index.d.ts +3 -0
- package/dist/commands/deploy-command/index.d.ts.map +1 -1
- package/dist/commands/deploy-command/index.js +297 -60
- package/dist/commands/deploy-command/index.js.map +1 -1
- package/dist/commands/deploy-command/select-target.js +1 -1
- package/dist/commands/deploy-command/select-target.js.map +1 -1
- package/dist/commands/deploy-command/version-command.d.ts.map +1 -1
- package/dist/commands/deploy-command/version-command.js +138 -12
- package/dist/commands/deploy-command/version-command.js.map +1 -1
- package/dist/commands/test-command/test-command.d.ts.map +1 -1
- package/dist/commands/test-command/test-command.js +23 -11
- package/dist/commands/test-command/test-command.js.map +1 -1
- package/dist/nevermore.js +17 -0
- package/dist/nevermore.js.map +1 -1
- package/dist/utils/batch/changed-packages-utils.d.ts +1 -1
- package/dist/utils/batch/changed-packages-utils.d.ts.map +1 -1
- package/dist/utils/batch/changed-packages-utils.js +1 -1
- package/dist/utils/batch/changed-packages-utils.js.map +1 -1
- package/dist/utils/build/base-place-resolver-factory.d.ts +25 -0
- package/dist/utils/build/base-place-resolver-factory.d.ts.map +1 -0
- package/dist/utils/build/base-place-resolver-factory.js +40 -0
- package/dist/utils/build/base-place-resolver-factory.js.map +1 -0
- package/dist/utils/build/build.d.ts +13 -2
- package/dist/utils/build/build.d.ts.map +1 -1
- package/dist/utils/build/build.js.map +1 -1
- package/dist/utils/build/upload.d.ts +1 -1
- package/dist/utils/build/upload.d.ts.map +1 -1
- package/dist/utils/deploy/deploy-metadata.d.ts +1 -1
- package/dist/utils/deploy/deploy-metadata.d.ts.map +1 -1
- package/dist/utils/job-context/base-job-context.d.ts +3 -1
- package/dist/utils/job-context/base-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/base-job-context.js +45 -6
- package/dist/utils/job-context/base-job-context.js.map +1 -1
- package/dist/utils/job-context/batch-script-job-context.d.ts +6 -0
- package/dist/utils/job-context/batch-script-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/batch-script-job-context.js +13 -0
- package/dist/utils/job-context/batch-script-job-context.js.map +1 -1
- package/dist/utils/job-context/cloud-job-context.d.ts +2 -1
- package/dist/utils/job-context/cloud-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/cloud-job-context.js +2 -2
- package/dist/utils/job-context/cloud-job-context.js.map +1 -1
- package/dist/utils/job-context/local-job-context.d.ts +2 -1
- package/dist/utils/job-context/local-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/local-job-context.js +2 -2
- package/dist/utils/job-context/local-job-context.js.map +1 -1
- package/dist/utils/open-cloud/open-cloud-client.d.ts +20 -2
- package/dist/utils/open-cloud/open-cloud-client.d.ts.map +1 -1
- package/dist/utils/open-cloud/open-cloud-client.js +78 -21
- package/dist/utils/open-cloud/open-cloud-client.js.map +1 -1
- package/dist/utils/open-cloud/open-cloud-client.test.js +89 -12
- package/dist/utils/open-cloud/open-cloud-client.test.js.map +1 -1
- package/dist/utils/testing/parsers/batch-log-parser.d.ts +13 -5
- package/dist/utils/testing/parsers/batch-log-parser.d.ts.map +1 -1
- package/dist/utils/testing/parsers/batch-log-parser.js +114 -68
- package/dist/utils/testing/parsers/batch-log-parser.js.map +1 -1
- package/dist/utils/testing/parsers/batch-log-parser.test.js +57 -5
- package/dist/utils/testing/parsers/batch-log-parser.test.js.map +1 -1
- package/dist/utils/testing/parsers/traceback-parser.d.ts +31 -0
- package/dist/utils/testing/parsers/traceback-parser.d.ts.map +1 -0
- package/dist/utils/testing/parsers/traceback-parser.js +91 -0
- package/dist/utils/testing/parsers/traceback-parser.js.map +1 -0
- package/dist/utils/testing/parsers/traceback-parser.test.d.ts +2 -0
- package/dist/utils/testing/parsers/traceback-parser.test.d.ts.map +1 -0
- package/dist/utils/testing/parsers/traceback-parser.test.js +45 -0
- package/dist/utils/testing/parsers/traceback-parser.test.js.map +1 -0
- package/dist/utils/testing/runner/combined-project-generator.d.ts +1 -1
- package/dist/utils/testing/runner/combined-project-generator.d.ts.map +1 -1
- package/dist/utils/testing/runner/test-runner.d.ts +9 -1
- package/dist/utils/testing/runner/test-runner.d.ts.map +1 -1
- package/dist/utils/testing/runner/test-runner.js +28 -3
- package/dist/utils/testing/runner/test-runner.js.map +1 -1
- package/dist/utils/testing/runner/test-runner.test.d.ts +2 -0
- package/dist/utils/testing/runner/test-runner.test.d.ts.map +1 -0
- package/dist/utils/testing/runner/test-runner.test.js +18 -0
- package/dist/utils/testing/runner/test-runner.test.js.map +1 -0
- package/dist/utils/testing/test-log-parser.d.ts +32 -1
- package/dist/utils/testing/test-log-parser.d.ts.map +1 -1
- package/dist/utils/testing/test-log-parser.js +53 -9
- package/dist/utils/testing/test-log-parser.js.map +1 -1
- package/dist/utils/testing/test-log-parser.test.d.ts +2 -0
- package/dist/utils/testing/test-log-parser.test.d.ts.map +1 -0
- package/dist/utils/testing/test-log-parser.test.js +56 -0
- package/dist/utils/testing/test-log-parser.test.js.map +1 -0
- package/dist/utils/watch/github-context.d.ts +50 -0
- package/dist/utils/watch/github-context.d.ts.map +1 -0
- package/dist/utils/watch/github-context.js +125 -0
- package/dist/utils/watch/github-context.js.map +1 -0
- package/dist/utils/watch/github-context.test.d.ts +2 -0
- package/dist/utils/watch/github-context.test.d.ts.map +1 -0
- package/dist/utils/watch/github-context.test.js +112 -0
- package/dist/utils/watch/github-context.test.js.map +1 -0
- package/dist/utils/watch/http-watch-registry.d.ts +40 -0
- package/dist/utils/watch/http-watch-registry.d.ts.map +1 -0
- package/dist/utils/watch/http-watch-registry.js +262 -0
- package/dist/utils/watch/http-watch-registry.js.map +1 -0
- package/dist/utils/watch/http-watch-registry.test.d.ts +2 -0
- package/dist/utils/watch/http-watch-registry.test.d.ts.map +1 -0
- package/dist/utils/watch/http-watch-registry.test.js +211 -0
- package/dist/utils/watch/http-watch-registry.test.js.map +1 -0
- package/dist/utils/watch/local-watch-loop.d.ts +50 -0
- package/dist/utils/watch/local-watch-loop.d.ts.map +1 -0
- package/dist/utils/watch/local-watch-loop.js +103 -0
- package/dist/utils/watch/local-watch-loop.js.map +1 -0
- package/dist/utils/watch/local-watch-loop.test.d.ts +2 -0
- package/dist/utils/watch/local-watch-loop.test.d.ts.map +1 -0
- package/dist/utils/watch/local-watch-loop.test.js +170 -0
- package/dist/utils/watch/local-watch-loop.test.js.map +1 -0
- package/dist/utils/watch/register-notify-watches.d.ts +41 -0
- package/dist/utils/watch/register-notify-watches.d.ts.map +1 -0
- package/dist/utils/watch/register-notify-watches.js +159 -0
- package/dist/utils/watch/register-notify-watches.js.map +1 -0
- package/dist/utils/watch/register-notify-watches.test.d.ts +2 -0
- package/dist/utils/watch/register-notify-watches.test.d.ts.map +1 -0
- package/dist/utils/watch/register-notify-watches.test.js +225 -0
- package/dist/utils/watch/register-notify-watches.test.js.map +1 -0
- package/dist/utils/watch/register-watches.d.ts +68 -0
- package/dist/utils/watch/register-watches.d.ts.map +1 -0
- package/dist/utils/watch/register-watches.js +221 -0
- package/dist/utils/watch/register-watches.js.map +1 -0
- package/dist/utils/watch/register-watches.test.d.ts +2 -0
- package/dist/utils/watch/register-watches.test.d.ts.map +1 -0
- package/dist/utils/watch/register-watches.test.js +576 -0
- package/dist/utils/watch/register-watches.test.js.map +1 -0
- package/dist/utils/watch/stream-watch-loop.d.ts +54 -0
- package/dist/utils/watch/stream-watch-loop.d.ts.map +1 -0
- package/dist/utils/watch/stream-watch-loop.js +282 -0
- package/dist/utils/watch/stream-watch-loop.js.map +1 -0
- package/dist/utils/watch/stream-watch-loop.test.d.ts +2 -0
- package/dist/utils/watch/stream-watch-loop.test.d.ts.map +1 -0
- package/dist/utils/watch/stream-watch-loop.test.js +392 -0
- package/dist/utils/watch/stream-watch-loop.test.js.map +1 -0
- package/dist/utils/watch/websocket-watch-stream.d.ts +25 -0
- package/dist/utils/watch/websocket-watch-stream.d.ts.map +1 -0
- package/dist/utils/watch/websocket-watch-stream.js +306 -0
- package/dist/utils/watch/websocket-watch-stream.js.map +1 -0
- package/dist/utils/watch/websocket-watch-stream.test.d.ts +2 -0
- package/dist/utils/watch/websocket-watch-stream.test.d.ts.map +1 -0
- package/dist/utils/watch/websocket-watch-stream.test.js +475 -0
- package/dist/utils/watch/websocket-watch-stream.test.js.map +1 -0
- package/package.json +7 -4
- package/src/args/global-args.ts +13 -0
- package/src/commands/batch-command/batch-deploy-command.ts +105 -1
- package/src/commands/batch-command/batch-test-command.ts +86 -60
- package/src/commands/deploy-command/deploy-init.ts +1 -1
- package/src/commands/deploy-command/index.ts +327 -32
- package/src/commands/deploy-command/select-target.ts +1 -1
- package/src/commands/deploy-command/version-command.ts +215 -21
- package/src/commands/test-command/test-command.ts +31 -22
- package/src/nevermore.ts +19 -0
- package/src/utils/batch/changed-packages-utils.ts +1 -1
- package/src/utils/build/base-place-resolver-factory.ts +49 -0
- package/src/utils/build/build.ts +13 -2
- package/src/utils/build/upload.ts +1 -1
- package/src/utils/deploy/deploy-metadata.ts +1 -1
- package/src/utils/job-context/base-job-context.ts +68 -6
- package/src/utils/job-context/batch-script-job-context.ts +18 -0
- package/src/utils/job-context/cloud-job-context.ts +7 -2
- package/src/utils/job-context/local-job-context.ts +7 -2
- package/src/utils/open-cloud/open-cloud-client.test.ts +133 -14
- package/src/utils/open-cloud/open-cloud-client.ts +131 -35
- package/src/utils/testing/parsers/batch-log-parser.test.ts +70 -5
- package/src/utils/testing/parsers/batch-log-parser.ts +141 -80
- package/src/utils/testing/parsers/traceback-parser.test.ts +64 -0
- package/src/utils/testing/parsers/traceback-parser.ts +122 -0
- package/src/utils/testing/runner/combined-project-generator.ts +1 -1
- package/src/utils/testing/runner/test-runner.test.ts +29 -0
- package/src/utils/testing/runner/test-runner.ts +36 -4
- package/src/utils/testing/test-log-parser.test.ts +70 -0
- package/src/utils/testing/test-log-parser.ts +80 -10
- package/src/utils/watch/github-context.test.ts +154 -0
- package/src/utils/watch/github-context.ts +184 -0
- package/src/utils/watch/http-watch-registry.test.ts +330 -0
- package/src/utils/watch/http-watch-registry.ts +341 -0
- package/src/utils/watch/local-watch-loop.test.ts +197 -0
- package/src/utils/watch/local-watch-loop.ts +190 -0
- package/src/utils/watch/register-notify-watches.test.ts +282 -0
- package/src/utils/watch/register-notify-watches.ts +226 -0
- package/src/utils/watch/register-watches.test.ts +696 -0
- package/src/utils/watch/register-watches.ts +369 -0
- package/src/utils/watch/stream-watch-loop.test.ts +625 -0
- package/src/utils/watch/stream-watch-loop.ts +411 -0
- package/src/utils/watch/websocket-watch-stream.test.ts +581 -0
- package/src/utils/watch/websocket-watch-stream.ts +403 -0
- package/tsconfig.json +19 -6
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/build/deploy-config.d.ts +0 -71
- package/dist/utils/build/deploy-config.d.ts.map +0 -1
- package/dist/utils/build/deploy-config.js +0 -164
- package/dist/utils/build/deploy-config.js.map +0 -1
- package/dist/utils/build/deploy-config.test.d.ts +0 -2
- package/dist/utils/build/deploy-config.test.d.ts.map +0 -1
- package/dist/utils/build/deploy-config.test.js +0 -126
- package/dist/utils/build/deploy-config.test.js.map +0 -1
- package/src/utils/build/deploy-config.test.ts +0 -149
- package/src/utils/build/deploy-config.ts +0 -259
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
runLocalWatchLoopAsync,
|
|
4
|
+
type LocalWatchEntry,
|
|
5
|
+
} from './local-watch-loop.js';
|
|
6
|
+
|
|
7
|
+
function makeEntry(overrides: Partial<LocalWatchEntry> = {}): LocalWatchEntry {
|
|
8
|
+
return {
|
|
9
|
+
label: 'integration.places.hub',
|
|
10
|
+
universeId: 10,
|
|
11
|
+
placeId: 20,
|
|
12
|
+
versionType: 'published',
|
|
13
|
+
baseline: 158,
|
|
14
|
+
...overrides,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Drives the loop deterministically: time only advances when the loop sleeps,
|
|
20
|
+
* so a test controls exactly how many poll rounds happen.
|
|
21
|
+
*/
|
|
22
|
+
function makeClock(pollIntervalMs: number) {
|
|
23
|
+
let current = 0;
|
|
24
|
+
return {
|
|
25
|
+
now: () => current,
|
|
26
|
+
sleepAsync: async () => {
|
|
27
|
+
current += pollIntervalMs;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
describe('runLocalWatchLoopAsync', () => {
|
|
33
|
+
it('redeploys when the base place moves', async () => {
|
|
34
|
+
const versions = [158, 158, 159];
|
|
35
|
+
let i = 0;
|
|
36
|
+
const redeployed: number[] = [];
|
|
37
|
+
const clock = makeClock(1000);
|
|
38
|
+
|
|
39
|
+
const result = await runLocalWatchLoopAsync({
|
|
40
|
+
entries: [makeEntry()],
|
|
41
|
+
source: {
|
|
42
|
+
resolveLatestPlaceVersionAsync: async () =>
|
|
43
|
+
versions[Math.min(i++, versions.length - 1)]!,
|
|
44
|
+
},
|
|
45
|
+
durationMs: 3000,
|
|
46
|
+
pollIntervalMs: 1000,
|
|
47
|
+
redeployAsync: async (_entry, version) => {
|
|
48
|
+
redeployed.push(version);
|
|
49
|
+
},
|
|
50
|
+
...clock,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
expect(redeployed).toEqual([159]);
|
|
54
|
+
expect(result.redeploys).toBe(1);
|
|
55
|
+
expect(result.failures).toBe(0);
|
|
56
|
+
expect(result.expired).toBe(true);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('does not redeploy while the version holds still', async () => {
|
|
60
|
+
const redeployed: number[] = [];
|
|
61
|
+
const clock = makeClock(1000);
|
|
62
|
+
|
|
63
|
+
const result = await runLocalWatchLoopAsync({
|
|
64
|
+
entries: [makeEntry()],
|
|
65
|
+
source: { resolveLatestPlaceVersionAsync: async () => 158 },
|
|
66
|
+
durationMs: 5000,
|
|
67
|
+
pollIntervalMs: 1000,
|
|
68
|
+
redeployAsync: async (_e, v) => {
|
|
69
|
+
redeployed.push(v);
|
|
70
|
+
},
|
|
71
|
+
...clock,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
expect(redeployed).toEqual([]);
|
|
75
|
+
expect(result.redeploys).toBe(0);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// An entry with no lock entry has no baseline. Treating "unknown -> 158" as a
|
|
79
|
+
// change would rebuild immediately on startup for no reason.
|
|
80
|
+
it('adopts the first observed version when there is no baseline', async () => {
|
|
81
|
+
const redeployed: number[] = [];
|
|
82
|
+
const clock = makeClock(1000);
|
|
83
|
+
|
|
84
|
+
await runLocalWatchLoopAsync({
|
|
85
|
+
entries: [makeEntry({ baseline: undefined })],
|
|
86
|
+
source: { resolveLatestPlaceVersionAsync: async () => 158 },
|
|
87
|
+
durationMs: 3000,
|
|
88
|
+
pollIntervalMs: 1000,
|
|
89
|
+
redeployAsync: async (_e, v) => {
|
|
90
|
+
redeployed.push(v);
|
|
91
|
+
},
|
|
92
|
+
...clock,
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
expect(redeployed).toEqual([]);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it('keeps watching after a poll failure', async () => {
|
|
99
|
+
let call = 0;
|
|
100
|
+
const redeployed: number[] = [];
|
|
101
|
+
const clock = makeClock(1000);
|
|
102
|
+
|
|
103
|
+
const result = await runLocalWatchLoopAsync({
|
|
104
|
+
entries: [makeEntry()],
|
|
105
|
+
source: {
|
|
106
|
+
resolveLatestPlaceVersionAsync: async () => {
|
|
107
|
+
call++;
|
|
108
|
+
if (call === 1) {
|
|
109
|
+
throw new Error('ECONNRESET');
|
|
110
|
+
}
|
|
111
|
+
return 159;
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
durationMs: 3000,
|
|
115
|
+
pollIntervalMs: 1000,
|
|
116
|
+
redeployAsync: async (_e, v) => {
|
|
117
|
+
redeployed.push(v);
|
|
118
|
+
},
|
|
119
|
+
...clock,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
expect(redeployed).toEqual([159]);
|
|
123
|
+
expect(result.redeploys).toBe(1);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// The new version is recorded only on a successful rebuild, so a transient
|
|
127
|
+
// build failure is retried rather than silently skipped forever.
|
|
128
|
+
it('retries a version whose rebuild failed', async () => {
|
|
129
|
+
let attempts = 0;
|
|
130
|
+
const clock = makeClock(1000);
|
|
131
|
+
|
|
132
|
+
const result = await runLocalWatchLoopAsync({
|
|
133
|
+
entries: [makeEntry()],
|
|
134
|
+
source: { resolveLatestPlaceVersionAsync: async () => 159 },
|
|
135
|
+
durationMs: 3000,
|
|
136
|
+
pollIntervalMs: 1000,
|
|
137
|
+
redeployAsync: async () => {
|
|
138
|
+
attempts++;
|
|
139
|
+
if (attempts === 1) {
|
|
140
|
+
throw new Error('rojo exploded');
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
...clock,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
expect(attempts).toBeGreaterThan(1);
|
|
147
|
+
expect(result.failures).toBe(1);
|
|
148
|
+
expect(result.redeploys).toBe(1);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('stops when the caller aborts', async () => {
|
|
152
|
+
const controller = new AbortController();
|
|
153
|
+
const clock = makeClock(1000);
|
|
154
|
+
const poll = vi.fn(async () => {
|
|
155
|
+
controller.abort();
|
|
156
|
+
return 158;
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
const result = await runLocalWatchLoopAsync({
|
|
160
|
+
entries: [makeEntry()],
|
|
161
|
+
source: { resolveLatestPlaceVersionAsync: poll },
|
|
162
|
+
durationMs: 60_000,
|
|
163
|
+
pollIntervalMs: 1000,
|
|
164
|
+
redeployAsync: async () => {},
|
|
165
|
+
signal: controller.signal,
|
|
166
|
+
...clock,
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
expect(poll).toHaveBeenCalledTimes(1);
|
|
170
|
+
expect(result.expired).toBe(false);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it('watches every entry independently', async () => {
|
|
174
|
+
const seen: string[] = [];
|
|
175
|
+
const clock = makeClock(1000);
|
|
176
|
+
|
|
177
|
+
await runLocalWatchLoopAsync({
|
|
178
|
+
entries: [
|
|
179
|
+
makeEntry({ label: 'hub', placeId: 20, baseline: 1 }),
|
|
180
|
+
makeEntry({ label: 'lobby', placeId: 21, baseline: 1 }),
|
|
181
|
+
],
|
|
182
|
+
source: {
|
|
183
|
+
resolveLatestPlaceVersionAsync: async (_u, placeId) =>
|
|
184
|
+
placeId === 21 ? 2 : 1,
|
|
185
|
+
},
|
|
186
|
+
durationMs: 2000,
|
|
187
|
+
pollIntervalMs: 1000,
|
|
188
|
+
redeployAsync: async (entry) => {
|
|
189
|
+
seen.push(entry.label);
|
|
190
|
+
},
|
|
191
|
+
...clock,
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
expect(seen).toContain('lobby');
|
|
195
|
+
expect(seen).not.toContain('hub');
|
|
196
|
+
});
|
|
197
|
+
});
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { OutputHelper } from '@quenty/cli-output-helpers';
|
|
2
|
+
import {
|
|
3
|
+
type BasePlaceVersionKeyword,
|
|
4
|
+
type PlaceVersionSource,
|
|
5
|
+
} from '@quenty/nevermore-deploy';
|
|
6
|
+
|
|
7
|
+
/** How often to ask Open Cloud whether a base place moved. */
|
|
8
|
+
const DEFAULT_POLL_INTERVAL_MS = 15_000;
|
|
9
|
+
|
|
10
|
+
/** One base place being watched, and what to rebuild when it moves. */
|
|
11
|
+
export interface LocalWatchEntry {
|
|
12
|
+
/** Human label for output, e.g. `integration.places.hub`. */
|
|
13
|
+
label: string;
|
|
14
|
+
universeId: number;
|
|
15
|
+
placeId: number;
|
|
16
|
+
versionType: BasePlaceVersionKeyword;
|
|
17
|
+
/**
|
|
18
|
+
* Version this entry was last built from. Undefined means "adopt whatever
|
|
19
|
+
* the first poll sees", which avoids a rebuild on startup for a place that
|
|
20
|
+
* has never been locked.
|
|
21
|
+
*/
|
|
22
|
+
baseline?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface LocalWatchLoopOptions {
|
|
26
|
+
entries: LocalWatchEntry[];
|
|
27
|
+
source: PlaceVersionSource;
|
|
28
|
+
/** Stop watching after this long. */
|
|
29
|
+
durationMs: number;
|
|
30
|
+
pollIntervalMs?: number;
|
|
31
|
+
/** Rebuild and redeploy. Errors are reported and the loop continues. */
|
|
32
|
+
redeployAsync: (entry: LocalWatchEntry, version: number) => Promise<void>;
|
|
33
|
+
/** Lets a caller stop the loop; SIGINT is wired to one by default. */
|
|
34
|
+
signal?: AbortSignal;
|
|
35
|
+
/** Injected in tests. */
|
|
36
|
+
now?: () => number;
|
|
37
|
+
sleepAsync?: (ms: number, signal: AbortSignal) => Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface LocalWatchLoopResult {
|
|
41
|
+
/** Rebuilds that completed. */
|
|
42
|
+
redeploys: number;
|
|
43
|
+
/** Rebuilds that were attempted and threw. */
|
|
44
|
+
failures: number;
|
|
45
|
+
/** True when the duration ran out rather than the user interrupting. */
|
|
46
|
+
expired: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Poll base places and redeploy in-process when one moves.
|
|
51
|
+
*
|
|
52
|
+
* This is what `--watch` does outside CI. Registering with the watch service
|
|
53
|
+
* would be pointless on a laptop: the service's only action is dispatching a
|
|
54
|
+
* GitHub workflow, which would rebuild on a runner rather than here — so a
|
|
55
|
+
* local run keeps the loop in the terminal, where the developer can see it.
|
|
56
|
+
*
|
|
57
|
+
* Poll failures never end the loop. A watch is meant to be left running for
|
|
58
|
+
* hours, and a dropped connection is not a reason to stop watching.
|
|
59
|
+
*/
|
|
60
|
+
export async function runLocalWatchLoopAsync(
|
|
61
|
+
options: LocalWatchLoopOptions
|
|
62
|
+
): Promise<LocalWatchLoopResult> {
|
|
63
|
+
const {
|
|
64
|
+
entries,
|
|
65
|
+
source,
|
|
66
|
+
durationMs,
|
|
67
|
+
redeployAsync,
|
|
68
|
+
pollIntervalMs = DEFAULT_POLL_INTERVAL_MS,
|
|
69
|
+
now = () => Date.now(),
|
|
70
|
+
sleepAsync = _sleepAsync,
|
|
71
|
+
} = options;
|
|
72
|
+
|
|
73
|
+
const controller = new AbortController();
|
|
74
|
+
const signal = options.signal ?? controller.signal;
|
|
75
|
+
const onSigint = () => controller.abort();
|
|
76
|
+
if (!options.signal) {
|
|
77
|
+
process.on('SIGINT', onSigint);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const seen = new Map<string, number | undefined>(
|
|
81
|
+
entries.map((e) => [_key(e), e.baseline])
|
|
82
|
+
);
|
|
83
|
+
const deadline = now() + durationMs;
|
|
84
|
+
let redeploys = 0;
|
|
85
|
+
let failures = 0;
|
|
86
|
+
|
|
87
|
+
OutputHelper.info(
|
|
88
|
+
`Watching ${entries.length} base place${
|
|
89
|
+
entries.length === 1 ? '' : 's'
|
|
90
|
+
} locally. Ctrl-C to stop.`
|
|
91
|
+
);
|
|
92
|
+
for (const entry of entries) {
|
|
93
|
+
OutputHelper.info(
|
|
94
|
+
` ${entry.label} — base place ${entry.placeId} (${entry.versionType}${
|
|
95
|
+
entry.baseline == null ? '' : ` v${entry.baseline}`
|
|
96
|
+
})`
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
try {
|
|
101
|
+
while (!signal.aborted && now() < deadline) {
|
|
102
|
+
for (const entry of entries) {
|
|
103
|
+
if (signal.aborted) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
let latest: number;
|
|
108
|
+
try {
|
|
109
|
+
latest = await source.resolveLatestPlaceVersionAsync(
|
|
110
|
+
entry.universeId,
|
|
111
|
+
entry.placeId,
|
|
112
|
+
entry.versionType
|
|
113
|
+
);
|
|
114
|
+
} catch (err) {
|
|
115
|
+
OutputHelper.warn(
|
|
116
|
+
`Could not check ${entry.label}: ` +
|
|
117
|
+
(err instanceof Error ? err.message : String(err))
|
|
118
|
+
);
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const key = _key(entry);
|
|
123
|
+
const previous = seen.get(key);
|
|
124
|
+
if (previous === undefined) {
|
|
125
|
+
// First sighting of a place with no recorded baseline: adopt it
|
|
126
|
+
// rather than treating "unknown -> something" as a change.
|
|
127
|
+
seen.set(key, latest);
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (latest === previous) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
OutputHelper.info(
|
|
135
|
+
`${entry.label}: base place moved v${previous} → v${latest}, rebuilding...`
|
|
136
|
+
);
|
|
137
|
+
try {
|
|
138
|
+
await redeployAsync(entry, latest);
|
|
139
|
+
redeploys++;
|
|
140
|
+
// Recorded only on success, so a failed rebuild is retried on the
|
|
141
|
+
// next poll instead of being silently skipped forever.
|
|
142
|
+
seen.set(key, latest);
|
|
143
|
+
OutputHelper.info(`${entry.label}: rebuilt from v${latest}.`);
|
|
144
|
+
} catch (err) {
|
|
145
|
+
failures++;
|
|
146
|
+
OutputHelper.error(
|
|
147
|
+
`${entry.label}: rebuild failed — ` +
|
|
148
|
+
(err instanceof Error ? err.message : String(err))
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (signal.aborted || now() >= deadline) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
await sleepAsync(pollIntervalMs, signal);
|
|
157
|
+
}
|
|
158
|
+
} finally {
|
|
159
|
+
if (!options.signal) {
|
|
160
|
+
process.off('SIGINT', onSigint);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const expired = !signal.aborted;
|
|
165
|
+
OutputHelper.info(
|
|
166
|
+
expired
|
|
167
|
+
? `Watch lease elapsed. ${redeploys} rebuild${
|
|
168
|
+
redeploys === 1 ? '' : 's'
|
|
169
|
+
}.`
|
|
170
|
+
: `Stopped watching. ${redeploys} rebuild${redeploys === 1 ? '' : 's'}.`
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
return { redeploys, failures, expired };
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function _key(entry: LocalWatchEntry): string {
|
|
177
|
+
return `${entry.placeId}:${entry.versionType}`;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function _sleepAsync(ms: number, signal: AbortSignal): Promise<void> {
|
|
181
|
+
return new Promise((resolve) => {
|
|
182
|
+
const timer = setTimeout(finish, ms);
|
|
183
|
+
function finish() {
|
|
184
|
+
clearTimeout(timer);
|
|
185
|
+
signal.removeEventListener('abort', finish);
|
|
186
|
+
resolve();
|
|
187
|
+
}
|
|
188
|
+
signal.addEventListener('abort', finish, { once: true });
|
|
189
|
+
});
|
|
190
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
parseWatchOption,
|
|
4
|
+
type WatchNotifyAction,
|
|
5
|
+
type WatchRegistrationRequest,
|
|
6
|
+
type WatchRegistry,
|
|
7
|
+
} from '@quenty/nevermore-deploy';
|
|
8
|
+
import { type LocalWatchEntry } from './local-watch-loop.js';
|
|
9
|
+
import {
|
|
10
|
+
describeNotifyWatchFallback,
|
|
11
|
+
tryRegisterNotifyWatchesAsync,
|
|
12
|
+
} from './register-notify-watches.js';
|
|
13
|
+
|
|
14
|
+
const REGISTER_BASE = 'https://watch.example.com/v1/register/';
|
|
15
|
+
const watchOption = () => parseWatchOption(`${REGISTER_BASE}30m`);
|
|
16
|
+
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
vi.stubEnv('GITHUB_REPOSITORY', 'Quenty/egg-hunt-2026');
|
|
19
|
+
vi.stubEnv('GITHUB_REF_NAME', 'release');
|
|
20
|
+
vi.stubEnv('NEVERMORE_WATCH_TOKEN', 'token-value');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
afterEach(() => {
|
|
24
|
+
vi.unstubAllEnvs();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
function makeEntry(overrides: Partial<LocalWatchEntry> = {}): LocalWatchEntry {
|
|
28
|
+
return {
|
|
29
|
+
label: 'integration.places.hub',
|
|
30
|
+
universeId: 10,
|
|
31
|
+
placeId: 20,
|
|
32
|
+
versionType: 'published',
|
|
33
|
+
...overrides,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function makeRecordingRegistry(monitorId?: string) {
|
|
38
|
+
const requests: WatchRegistrationRequest[] = [];
|
|
39
|
+
const create = (): WatchRegistry => ({
|
|
40
|
+
registerAsync: async (request) => {
|
|
41
|
+
requests.push(request);
|
|
42
|
+
return { monitorId: monitorId ?? 'mon_1', changed: true };
|
|
43
|
+
},
|
|
44
|
+
triggerAsync: async () => ({ results: [] }),
|
|
45
|
+
});
|
|
46
|
+
return { requests, create };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function notifyAction(
|
|
50
|
+
request: WatchRegistrationRequest,
|
|
51
|
+
index = 0
|
|
52
|
+
): WatchNotifyAction {
|
|
53
|
+
const action = request.watches[index]!.action;
|
|
54
|
+
expect(action.type).toBe('notify');
|
|
55
|
+
return action as WatchNotifyAction;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
describe('tryRegisterNotifyWatchesAsync', () => {
|
|
59
|
+
it('registers notify actions carrying the selector', async () => {
|
|
60
|
+
const registry = makeRecordingRegistry();
|
|
61
|
+
|
|
62
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
63
|
+
option: watchOption(),
|
|
64
|
+
monitorName: 'egg-hunt/integration',
|
|
65
|
+
entries: [makeEntry({ baseline: 158 })],
|
|
66
|
+
createRegistry: registry.create,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
expect(result.success).toBe(true);
|
|
70
|
+
const request = registry.requests[0]!;
|
|
71
|
+
// No baseline: the service compares its own token (an asset-delivery
|
|
72
|
+
// content hash) by string equality, so the lock's Open Cloud version number
|
|
73
|
+
// would read as drift on the first poll. The `ready` reconcile covers it.
|
|
74
|
+
expect(request.watches[0]!.baselineVersion).toBeUndefined();
|
|
75
|
+
expect(request.watches[0]!.baselineVersionKind).toBeUndefined();
|
|
76
|
+
expect(request.watches[0]!.source).toEqual({
|
|
77
|
+
type: 'roblox-place',
|
|
78
|
+
universeId: 10,
|
|
79
|
+
placeId: 20,
|
|
80
|
+
versionType: 'published',
|
|
81
|
+
});
|
|
82
|
+
expect(notifyAction(request).payload).toEqual({
|
|
83
|
+
target: 'integration.places.hub',
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// Re-registering replaces a monitor's whole watch list, so a local watch that
|
|
88
|
+
// shared CI's monitor name would silently disarm the workflow dispatch.
|
|
89
|
+
it('registers under a monitor name distinct from the dispatching one', async () => {
|
|
90
|
+
const registry = makeRecordingRegistry();
|
|
91
|
+
|
|
92
|
+
await tryRegisterNotifyWatchesAsync({
|
|
93
|
+
option: watchOption(),
|
|
94
|
+
monitorName: 'egg-hunt/integration',
|
|
95
|
+
entries: [makeEntry()],
|
|
96
|
+
createRegistry: registry.create,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
expect(registry.requests[0]!.monitorName).toBe(
|
|
100
|
+
'egg-hunt/integration/local'
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it('hands back stream entries keyed by the registered watch name', async () => {
|
|
105
|
+
const registry = makeRecordingRegistry();
|
|
106
|
+
|
|
107
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
108
|
+
option: watchOption(),
|
|
109
|
+
monitorName: 'egg-hunt/integration',
|
|
110
|
+
entries: [makeEntry()],
|
|
111
|
+
createRegistry: registry.create,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
expect(result.success && result.entries[0]!.watchName).toBe(
|
|
115
|
+
registry.requests[0]!.watches[0]!.name
|
|
116
|
+
);
|
|
117
|
+
expect(result.success && result.monitorId).toBe('mon_1');
|
|
118
|
+
expect(result.success && result.credential).toBe('token-value');
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// Places are only optionally named, so a multi-place target with unnamed
|
|
122
|
+
// places produces the same selector twice. The service resolves a duplicate
|
|
123
|
+
// name by dropping a watch rather than failing.
|
|
124
|
+
it('separates watches that would share a name', async () => {
|
|
125
|
+
const registry = makeRecordingRegistry();
|
|
126
|
+
|
|
127
|
+
await tryRegisterNotifyWatchesAsync({
|
|
128
|
+
option: watchOption(),
|
|
129
|
+
monitorName: 'egg-hunt/integration',
|
|
130
|
+
entries: [makeEntry({ placeId: 20 }), makeEntry({ placeId: 21 })],
|
|
131
|
+
createRegistry: registry.create,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const names = registry.requests[0]!.watches.map((w) => w.name);
|
|
135
|
+
expect(new Set(names).size).toBe(2);
|
|
136
|
+
expect(names).toEqual([
|
|
137
|
+
'integration.places.hub/20',
|
|
138
|
+
'integration.places.hub/21',
|
|
139
|
+
]);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('shares the Open Cloud key only when asked', async () => {
|
|
143
|
+
const registry = makeRecordingRegistry();
|
|
144
|
+
|
|
145
|
+
await tryRegisterNotifyWatchesAsync({
|
|
146
|
+
option: watchOption(),
|
|
147
|
+
monitorName: 'egg-hunt/integration',
|
|
148
|
+
entries: [makeEntry()],
|
|
149
|
+
createRegistry: registry.create,
|
|
150
|
+
});
|
|
151
|
+
expect(registry.requests[0]!.robloxApiKey).toBeUndefined();
|
|
152
|
+
|
|
153
|
+
await tryRegisterNotifyWatchesAsync({
|
|
154
|
+
option: watchOption(),
|
|
155
|
+
monitorName: 'egg-hunt/integration',
|
|
156
|
+
entries: [makeEntry()],
|
|
157
|
+
robloxApiKey: 'secret',
|
|
158
|
+
createRegistry: registry.create,
|
|
159
|
+
});
|
|
160
|
+
expect(registry.requests[1]!.robloxApiKey).toBe('secret');
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
describe('tryRegisterNotifyWatchesAsync falling back', () => {
|
|
165
|
+
// Every failure here has a working answer already — poll Open Cloud from this
|
|
166
|
+
// machine — so none of them may throw.
|
|
167
|
+
it('watches a "saved" place when a key is shared', async () => {
|
|
168
|
+
const registry = makeRecordingRegistry();
|
|
169
|
+
|
|
170
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
171
|
+
option: watchOption(),
|
|
172
|
+
monitorName: 'egg-hunt/integration',
|
|
173
|
+
entries: [makeEntry({ versionType: 'saved', baseline: 158 })],
|
|
174
|
+
robloxApiKey: 'secret',
|
|
175
|
+
createRegistry: registry.create,
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
expect(result.success).toBe(true);
|
|
179
|
+
const watch = registry.requests[0]!.watches[0]!;
|
|
180
|
+
expect(watch.source.versionType).toBe('saved');
|
|
181
|
+
// Same vocabulary once a key is in play, so the lock value is sendable.
|
|
182
|
+
expect(watch.baselineVersion).toBe('158');
|
|
183
|
+
expect(watch.baselineVersionKind).toBe('roblox-place-version');
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it('declines a "saved" base place the service cannot poll', async () => {
|
|
187
|
+
const registry = makeRecordingRegistry();
|
|
188
|
+
|
|
189
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
190
|
+
option: watchOption(),
|
|
191
|
+
monitorName: 'egg-hunt/integration',
|
|
192
|
+
entries: [makeEntry({ versionType: 'saved' })],
|
|
193
|
+
createRegistry: registry.create,
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
expect(result).toMatchObject({
|
|
197
|
+
success: false,
|
|
198
|
+
reason: 'unwatchable_version_type',
|
|
199
|
+
});
|
|
200
|
+
expect(registry.requests).toEqual([]);
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// Splitting the run — streaming the published places and polling the saved
|
|
204
|
+
// one — would leave two watch loops disagreeing about what is current.
|
|
205
|
+
it('declines the whole run when only some places are unwatchable', async () => {
|
|
206
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
207
|
+
option: watchOption(),
|
|
208
|
+
monitorName: 'egg-hunt/integration',
|
|
209
|
+
entries: [
|
|
210
|
+
makeEntry({ label: 'integration.places.hub' }),
|
|
211
|
+
makeEntry({ label: 'integration.places.lobby', versionType: 'saved' }),
|
|
212
|
+
],
|
|
213
|
+
createRegistry: makeRecordingRegistry().create,
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
expect(result).toMatchObject({ success: false });
|
|
217
|
+
expect(
|
|
218
|
+
result.success === false && describeNotifyWatchFallback(result)
|
|
219
|
+
).toMatch(/integration\.places\.lobby/);
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
it('declines without a token, since registration has no identity', async () => {
|
|
223
|
+
vi.stubEnv('NEVERMORE_WATCH_TOKEN', '');
|
|
224
|
+
vi.stubEnv('GITHUB_TOKEN', '');
|
|
225
|
+
|
|
226
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
227
|
+
option: watchOption(),
|
|
228
|
+
monitorName: 'egg-hunt/integration',
|
|
229
|
+
entries: [makeEntry()],
|
|
230
|
+
createRegistry: makeRecordingRegistry().create,
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
expect(result).toMatchObject({ success: false, reason: 'no_token' });
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
it('declines when the service refuses the registration', async () => {
|
|
237
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
238
|
+
option: watchOption(),
|
|
239
|
+
monitorName: 'egg-hunt/integration',
|
|
240
|
+
entries: [makeEntry()],
|
|
241
|
+
createRegistry: () => ({
|
|
242
|
+
registerAsync: async () => {
|
|
243
|
+
throw new Error('503 Service Unavailable');
|
|
244
|
+
},
|
|
245
|
+
triggerAsync: async () => ({ results: [] }),
|
|
246
|
+
}),
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
expect(result).toMatchObject({
|
|
250
|
+
success: false,
|
|
251
|
+
reason: 'register_failed',
|
|
252
|
+
});
|
|
253
|
+
expect(
|
|
254
|
+
result.success === false && describeNotifyWatchFallback(result)
|
|
255
|
+
).toMatch(/503 Service Unavailable/);
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
it('declines when the service returns no monitor to stream', async () => {
|
|
259
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
260
|
+
option: watchOption(),
|
|
261
|
+
monitorName: 'egg-hunt/integration',
|
|
262
|
+
entries: [makeEntry()],
|
|
263
|
+
createRegistry: () => ({
|
|
264
|
+
registerAsync: async () => ({ changed: true }),
|
|
265
|
+
triggerAsync: async () => ({ results: [] }),
|
|
266
|
+
}),
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
expect(result).toMatchObject({ success: false, reason: 'no_monitor_id' });
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('declines when there is nothing to watch', async () => {
|
|
273
|
+
const result = await tryRegisterNotifyWatchesAsync({
|
|
274
|
+
option: watchOption(),
|
|
275
|
+
monitorName: 'egg-hunt/integration',
|
|
276
|
+
entries: [],
|
|
277
|
+
createRegistry: makeRecordingRegistry().create,
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
expect(result).toMatchObject({ success: false, reason: 'no_entries' });
|
|
281
|
+
});
|
|
282
|
+
});
|