UNPKG

@hackplan/polaris

Version:

Shopify’s product component library

14 lines (13 loc) 404 B
import chalk from 'chalk'; function toBeDisabled(received) { const pass = received.prop('disabled') === true; return { pass, message() { return pass ? chalk.green(`Expected component not to be disabled, but it was.`) : chalk.red(`Expected component to be disabled, but it wasn't.`); }, }; } expect.extend({ toBeDisabled });