Add hierarchical geography and cloud-hosted profile images
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ test('attachment preview uses a closable dialog and deletion has a restore path'
|
||||
});
|
||||
test('structured place formatting and search preserve separate ancestral/birth/legacy locations',()=>{
|
||||
const vm=require('node:vm'),js=fs.readFileSync('web/family.js','utf8');
|
||||
const c=vm.createContext({});vm.runInContext(js.slice(js.indexOf('function personLocation'),js.indexOf('function personName')),c);
|
||||
const c=vm.createContext({ZhaoGeography:require('./web/geography.js')});vm.runInContext(js.slice(js.indexOf('function personLocation'),js.indexOf('function personName')),c);
|
||||
const person={nativeProvince:'山东省',nativeCity:'烟台市',nativeDistrict:'莱阳市',birthCity:'济南市',birthplace:'旧村名'};
|
||||
assert.equal(c.personLocation(person,'native'),'山东省 · 烟台市 · 莱阳市');assert.equal(c.personLocation(person,'birth'),'济南市');assert.ok(c.personSearch(person).includes('旧村名'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user