feat(runtime): upgrade DSH and bundled plugins with startup migration
This commit is contained in:
@@ -26,9 +26,9 @@ test('non-JSON errors report HTTP status without exposing response content', asy
|
||||
});
|
||||
test('patch rejects unsupported or changed clients and double patching', () => {
|
||||
const source = Array(3).fill("await fetch('/plugins/dsh-session-delete/delete'); await response.json()").join(';');
|
||||
const patched = patchClient(source, '1.5.12');
|
||||
const patched = patchClient(source, '1.5.16');
|
||||
assert.equal(patched.split('await dshChatFetch(').length, 4);
|
||||
assert.throws(() => patchClient(source, '1.5.13'), /unsupported/);
|
||||
assert.throws(() => patchClient('', '1.5.12'), /unexpected/);
|
||||
assert.throws(() => patchClient(patched, '1.5.12'), /unexpected/);
|
||||
assert.throws(() => patchClient('', '1.5.16'), /unexpected/);
|
||||
assert.throws(() => patchClient(patched, '1.5.16'), /unexpected/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user