Update tests with new out_path_hash_mode field and surface error on path hash mode set failure

This commit is contained in:
Jack Kingsman
2026-03-08 00:04:11 -08:00
parent b3625b4937
commit 564cd65496
13 changed files with 40 additions and 1 deletions

View File

@@ -288,6 +288,7 @@ function makeContact(overrides: Partial<Contact> = {}): Contact {
last_read_at: null,
first_seen: null,
...overrides,
out_path_hash_mode: overrides.out_path_hash_mode ?? 0,
};
}

View File

@@ -24,6 +24,7 @@ const mockContact: Contact = {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,

View File

@@ -29,6 +29,7 @@ function createContact(overrides: Partial<Contact> = {}): Contact {
last_read_at: null,
first_seen: null,
...overrides,
out_path_hash_mode: overrides.out_path_hash_mode ?? 0,
};
}

View File

@@ -80,6 +80,7 @@ const contacts: Contact[] = [
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,

View File

@@ -228,6 +228,7 @@ describe('SearchView', () => {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,

View File

@@ -23,6 +23,7 @@ function makeContact(public_key: string, name: string, type = 1): Contact {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,

View File

@@ -196,6 +196,7 @@ describe('resolveContactFromHashToken', () => {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,
@@ -212,6 +213,7 @@ describe('resolveContactFromHashToken', () => {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,
@@ -228,6 +230,7 @@ describe('resolveContactFromHashToken', () => {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,

View File

@@ -49,6 +49,7 @@ function makeContact(suffix: string): Contact {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,

View File

@@ -45,6 +45,7 @@ function makeContact(pubkey: string): Contact {
flags: 0,
last_path: null,
last_path_len: -1,
out_path_hash_mode: 0,
last_advert: null,
lat: null,
lon: null,

View File

@@ -66,6 +66,7 @@ export interface Contact {
flags: number;
last_path: string | null;
last_path_len: number;
out_path_hash_mode: number;
last_advert: number | null;
lat: number | null;
lon: number | null;