@@ -119,7 +119,7 @@ describe("admin org feature-flags route maintains the snapshotStoreOrgDials coho
119119
120120 expect ( response . status ) . toBe ( 200 ) ;
121121 const dials = await readDials ( prisma ) ;
122- expect ( Object . prototype . hasOwnProperty . call ( dials ?? { } , id ) ) . toBe ( false ) ;
122+ expect ( Object . hasOwn ( dials ?? { } , id ) ) . toBe ( false ) ;
123123 expect ( dials ?. [ id ] ) . toBeUndefined ( ) ;
124124 }
125125 ) ;
@@ -140,39 +140,33 @@ describe("admin org feature-flags route maintains the snapshotStoreOrgDials coho
140140 }
141141 ) ;
142142
143- postgresTest (
144- "a later save to off stores off and keeps the entry present" ,
145- async ( { prisma } ) => {
146- await seedDialsRow ( prisma ) ;
147- const id = await seedOrg ( prisma ) ;
143+ postgresTest ( "a later save to off stores off and keeps the entry present" , async ( { prisma } ) => {
144+ await seedDialsRow ( prisma ) ;
145+ const id = await seedOrg ( prisma ) ;
148146
149- await post ( id , { [ MODE ] : "redis-read" } ) ;
150- const response = await post ( id , { [ MODE ] : "off" } ) ;
147+ await post ( id , { [ MODE ] : "redis-read" } ) ;
148+ const response = await post ( id , { [ MODE ] : "off" } ) ;
151149
152- expect ( response . status ) . toBe ( 200 ) ;
153- const dials = await readDials ( prisma ) ;
154- // Never deleted: off is a stored value, so the key survives the roll-back.
155- expect ( dials ) . not . toBeNull ( ) ;
156- expect ( Object . prototype . hasOwnProperty . call ( dials , id ) ) . toBe ( true ) ;
157- expect ( dials ?. [ id ] ) . toBe ( "off" ) ;
158- }
159- ) ;
150+ expect ( response . status ) . toBe ( 200 ) ;
151+ const dials = await readDials ( prisma ) ;
152+ // Never deleted: off is a stored value, so the key survives the roll-back.
153+ expect ( dials ) . not . toBeNull ( ) ;
154+ expect ( Object . hasOwn ( dials , id ) ) . toBe ( true ) ;
155+ expect ( dials ?. [ id ] ) . toBe ( "off" ) ;
156+ } ) ;
160157
161- postgresTest (
162- "saves for different orgs both persist without clobbering" ,
163- async ( { prisma } ) => {
164- await seedDialsRow ( prisma ) ;
165- const orgA = await seedOrg ( prisma ) ;
166- const orgB = await seedOrg ( prisma ) ;
158+ postgresTest ( "saves for different orgs both persist without clobbering" , async ( { prisma } ) => {
159+ await seedDialsRow ( prisma ) ;
160+ const orgA = await seedOrg ( prisma ) ;
161+ const orgB = await seedOrg ( prisma ) ;
167162
168- await post ( orgA , { [ MODE ] : "dual-write" } ) ;
169- await post ( orgB , { [ MODE ] : "redis-only" } ) ;
163+ await post ( orgA , { [ MODE ] : "dual-write" } ) ;
164+ await post ( orgB , { [ MODE ] : "redis-only" } ) ;
170165
171- const dials = await readDials ( prisma ) ;
172- expect ( dials ?. [ orgA ] ) . toBe ( "dual-write" ) ;
173- expect ( dials ?. [ orgB ] ) . toBe ( "redis-only" ) ;
174- }
175- ) ;
166+ const dials = await readDials ( prisma ) ;
167+ expect ( dials ?. [ orgA ] ) . toBe ( "dual-write" ) ;
168+ expect ( dials ?. [ orgB ] ) . toBe ( "redis-only" ) ;
169+ } ) ;
176170
177171 // The atomicity invariant the design rests on, which the sequential test above cannot see (a
178172 // read-modify-write regression passes a sequential save identically). Two independent clients
0 commit comments