2021-03-17 08:22:33 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { filterBusinessExtensions } from '../flows/selective-bundle';
|
|
|
|
|
|
|
|
describe( 'BusinessDetails', () => {
|
|
|
|
test( 'filtering extensions', () => {
|
|
|
|
const extensions = {
|
|
|
|
'creative-mail-by-constant-contact': true,
|
|
|
|
'facebook-for-woocommerce': true,
|
|
|
|
install_extensions: true,
|
|
|
|
jetpack: true,
|
2021-05-10 09:56:47 +00:00
|
|
|
'google-listings-and-ads': true,
|
2021-03-17 08:22:33 +00:00
|
|
|
'mailchimp-for-woocommerce': true,
|
|
|
|
'woocommerce-payments': true,
|
|
|
|
'woocommerce-services:shipping': true,
|
|
|
|
'woocommerce-services:tax': true,
|
|
|
|
};
|
|
|
|
|
|
|
|
const expectedExtensions = [
|
|
|
|
'creative-mail-by-constant-contact',
|
|
|
|
'facebook-for-woocommerce',
|
|
|
|
'jetpack',
|
2021-05-10 09:56:47 +00:00
|
|
|
'google-listings-and-ads',
|
2021-03-17 08:22:33 +00:00
|
|
|
'mailchimp-for-woocommerce',
|
|
|
|
'woocommerce-payments',
|
|
|
|
'woocommerce-services',
|
|
|
|
];
|
|
|
|
|
|
|
|
const filteredExtensions = filterBusinessExtensions( extensions );
|
|
|
|
|
|
|
|
expect( filteredExtensions ).toEqual( expectedExtensions );
|
|
|
|
} );
|
|
|
|
} );
|