@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 6f16c00
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 14:30 UTC

test: read PostgREST response body exactly once

davoodmehraban89 committed Nov 22, 2026 at 06:49 UTC 6f16c00b9b67eeace45cc2f5b46e8dfaff34c3ef
1 file changed +3 -2
scripts/wp2-authorized-journal-write-e2e.mjs
+3 -2
@@ -39,8 +39,9 @@ function success(result,label){
39 }
40 async function ownRecords(org,jwt,collection){
41 const response=await rest('records?select=id,version,data&organization_id=eq.'+encodeURIComponent(org)+'&collection=eq.'+encodeURIComponent(collection),jwt);
42 - assert.equal(response.status,200,'authorized '+collection+' read failed: '+await response.text().catch(()=>''));
43 - return response.json();
42 + const body=await response.text();
43 + assert.equal(response.status,200,'authorized '+collection+' read failed: '+body);
44 + return JSON.parse(body);
45 }
46 const email='wp2-positive-'+suffix+'@example.test';
47 const password='WP2-'+crypto.randomUUID()+'-Aa9!';