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,
|
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,
|
|
|
|
} = global.fixtureData;
|
2020-06-05 16:49:07 +00:00
|
|
|
return Promise.all( [
|
|
|
|
deleteTaxes( taxes ),
|
|
|
|
deleteCoupons( coupons ),
|
|
|
|
deleteProducts( products ),
|
|
|
|
deleteShippingZones( shippingZones ),
|
2020-06-15 14:59:18 +00:00
|
|
|
deleteBlockPages( pages ),
|
2020-06-05 16:49:07 +00:00
|
|
|
] ).catch( console.log );
|
|
|
|
};
|