Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should render based on the `onAction` prop.', () => {
const minimist = require('minimist');
minimist.__setReturnValue({
_: [
'foo',
],
});
const foo = jest.fn(() => 'hi foo');
const bar = jest.fn(() => 'hi bar');
const node = (
);
const output = renderTree(node);
expect(foo).toHaveBeenCalled();
expect(bar).not.toHaveBeenCalled();
expect(output).toBe('hi foo');
it('should run the num command.', async () => {
minimist.__setReturnValue({
_: [
'num',
],
});
const s = new Writable();
s.write = jest.fn();
await Wonders.render(, s);
expect(s.write).toHaveBeenCalledWith('1');
});