fix: close merge-review mail policy and repair validation gaps

This commit is contained in:
abaishu0730 committed 2026-10-27 14:38:36 +08:00
1 parent dcea4a063f
commit d744c36365
16 files changed
+168 -31

No files matched your search

+1
View File
@@ -43,3 +43,4 @@ test('dashboard asset initialization failure closes the already-created session
Module._resolveFilename=function(id,...rest){if(id==='@tabler/core/dist/css/tabler.min.css')throw new Error('fixture missing asset');return originalResolve.call(this,id,...rest);};SessionStore.prototype.close=function(){closed++;return originalClose.call(this);};
try{assert.throws(()=>createDashboard({store:new Store(path.join(dir,'dashboard')),outputDir:dir}),/fixture missing asset/);assert.equal(closed,1);}finally{Module._resolveFilename=originalResolve;SessionStore.prototype.close=originalClose;}
});
test('application wires test expiry to every manual mail submission path',async t=>{const options=await fixture(t),app=await main(options);t.after(async()=>{await app.stop();await fs.rm(options.stateDir,{recursive:true,force:true});});app.orderRules.put('stability-test',{id:'main',enabled:true,startedAt:'2026-01-01T00:00:00Z',endsAt:'2026-01-02T00:00:00Z'});assert.throws(()=>app.mail.beforeSend(),e=>e.code==='STABILITY_TEST_EXPIRED');});