feat: snip a region into chat, and make links clickable (#14)
This commit was merged in pull request #14.
This commit is contained in:
@@ -53,6 +53,26 @@ describe("resolvePreferences", () => {
|
||||
expect(resolved.showReasoning).toBe(true);
|
||||
expect(resolved.think).toBeUndefined();
|
||||
expect(resolved.resumeTimeoutMs).toBe(HOUR);
|
||||
// An empty string rather than undefined, so callers never branch on it.
|
||||
expect(resolved.place).toBe("");
|
||||
});
|
||||
|
||||
it("leaves IP geolocation off unless it was switched on", () => {
|
||||
// The one setting that sends something about the user to a third party is
|
||||
// opted into, never defaulted into.
|
||||
expect(resolvePreferences({}).ipGeolocation).toBe(false);
|
||||
expect(resolvePreferences({ ipGeolocation: true }).ipGeolocation).toBe(true);
|
||||
expect(resolvePreferences({ ipGeolocation: false }).ipGeolocation).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps the configured location, trimmed", () => {
|
||||
expect(resolvePreferences({ location: " Cebu City, Philippines " }).place).toBe(
|
||||
"Cebu City, Philippines",
|
||||
);
|
||||
});
|
||||
|
||||
it("treats a whitespace-only location as unset", () => {
|
||||
expect(resolvePreferences({ location: " " }).place).toBe("");
|
||||
});
|
||||
|
||||
it("honours the display toggles being switched off", () => {
|
||||
|
||||
Reference in New Issue
Block a user