@@ -151,10 +151,7 @@ test.describe( 'REST API Types Endpoint', () => {
151
151
} ) ;
152
152
153
153
// Should succeed if our test post type is properly registered with SCF
154
- expect ( typeWithScfSource ) . toHaveProperty (
155
- 'slug' ,
156
- customTestType
157
- ) ;
154
+ expect ( typeWithScfSource ) . toHaveProperty ( 'slug' , customTestType ) ;
158
155
} ) ;
159
156
160
157
test ( 'should validate source parameter values' , async ( {
@@ -283,9 +280,7 @@ test.describe( 'REST API Types Endpoint', () => {
283
280
284
281
// Test that it only appears in one source
285
282
const sourceCount =
286
- ( inScf ? 1 : 0 ) +
287
- ( inCore ? 1 : 0 ) +
288
- ( inOther ? 1 : 0 ) ;
283
+ ( inScf ? 1 : 0 ) + ( inCore ? 1 : 0 ) + ( inOther ? 1 : 0 ) ;
289
284
expect ( sourceCount ) . toBe ( 1 ) ;
290
285
291
286
// It should never be in core source
@@ -355,7 +350,10 @@ test.describe( 'REST API Types Endpoint', () => {
355
350
path : `/wp/v2/types/${ customTestType } ` ,
356
351
params : { source : 'scf' } ,
357
352
} ) ;
358
- expect ( customTypeWithScf ) . toHaveProperty ( 'slug' , customTestType ) ;
353
+ expect ( customTypeWithScf ) . toHaveProperty (
354
+ 'slug' ,
355
+ customTestType
356
+ ) ;
359
357
360
358
// SCF test type should NOT be accessible with other source
361
359
try {
@@ -386,15 +384,7 @@ test.describe( 'REST API Types Endpoint', () => {
386
384
} ) ;
387
385
388
386
test . afterAll ( async ( { requestUtils } ) => {
389
- // Deactivate the plugins
390
387
await requestUtils . deactivatePlugin ( 'scf-test-setup-post-types' ) ;
391
388
await requestUtils . deactivatePlugin ( PLUGIN_SLUG ) ;
392
-
393
- // Clean up by deleting the option that marks the post types as created
394
- await requestUtils . rest ( {
395
- path : '/wp/v2/settings' ,
396
- method : 'POST' ,
397
- data : { scf_test_post_type_created : false } ,
398
- } ) ;
399
389
} ) ;
400
390
} ) ;
0 commit comments