Create sample products before running tests.

This commit is contained in:
Jeff Stieler 2021-09-28 15:39:01 -04:00
parent e0b2af33b8
commit 4488ed846e
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,7 @@
/**
* Internal dependencies
*/
const { createSampleProducts } = require( '../../data/products' );
const { productsApi } = require('../../endpoints/products');
/**
@ -12,6 +13,10 @@ const { productsApi } = require('../../endpoints/products');
*/
describe( 'Products API tests', () => {
beforeAll( async () => {
await createSampleProducts();
} );
describe( 'List all products', () => {
it( 'defaults', async () => {