2020-06-05 16:49:07 +00:00
|
|
|
/* eslint-disable no-console */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { teardown as teardownPuppeteer } from 'jest-environment-puppeteer';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import {
|
|
|
|
deleteTaxes,
|
|
|
|
deleteCoupons,
|
|
|
|
deleteProducts,
|
|
|
|
deleteShippingZones,
|
2020-06-15 14:59:18 +00:00
|
|
|
deleteBlockPages,
|
2021-12-23 16:26:10 +00:00
|
|
|
deleteProductAttributes,
|
2020-06-05 16:49:07 +00:00
|
|
|
} from '../fixtures/fixture-loaders';
|
|
|
|
|
|
|
|
module.exports = async ( globalConfig ) => {
|
|
|
|
await teardownPuppeteer( globalConfig );
|
2020-06-15 14:59:18 +00:00
|
|
|
const {
|
|
|
|
taxes,
|
|
|
|
coupons,
|
|
|
|
products,
|
|
|
|
shippingZones,
|
|
|
|
pages,
|
2021-12-23 16:26:10 +00:00
|
|
|
attributes,
|
2020-06-15 14:59:18 +00:00
|
|
|
} = global.fixtureData;
|
2021-12-23 16:26:10 +00:00
|
|
|
return Promise.allSettled( [
|
2020-06-05 16:49:07 +00:00
|
|
|
deleteTaxes( taxes ),
|
|
|
|
deleteCoupons( coupons ),
|
|
|
|
deleteProducts( products ),
|
|
|
|
deleteShippingZones( shippingZones ),
|
2020-06-15 14:59:18 +00:00
|
|
|
deleteBlockPages( pages ),
|
2021-12-23 16:26:10 +00:00
|
|
|
deleteProductAttributes( attributes ),
|
2020-06-05 16:49:07 +00:00
|
|
|
] ).catch( console.log );
|
|
|
|
};
|