14 lines
285 B
TypeScript
14 lines
285 B
TypeScript
/**
|
|
* Internal dependencies
|
|
*/
|
|
import { Products } from '../e2e/fixtures/fixture-data';
|
|
|
|
/**
|
|
* Get products data by key from fixtures.
|
|
*/
|
|
export const getFixtureProductsData = ( key: string ) => {
|
|
return Products()
|
|
.map( ( product ) => product[ key ] )
|
|
.filter( Boolean );
|
|
};
|