mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-04-26 01:14:19 +08:00
12 lines
301 B
JavaScript
12 lines
301 B
JavaScript
// Mock for @wordpress/i18n
|
|
|
|
const __ = jest.fn( ( text, domain ) => text );
|
|
const sprintf = jest.fn( ( format, ...args ) => {
|
|
let index = 0;
|
|
return format.replace( /%[sd]/g, () => {
|
|
const arg = args[ index++ ];
|
|
return arg !== undefined ? String( arg ) : '';
|
|
} );
|
|
} );
|
|
|
|
export { __, sprintf };
|