Files
PriceUpdaterAppv2/tests/__mocks__/ink.js

19 lines
400 B
JavaScript

// Mock Ink components for testing
const React = require("react");
const Box = ({ children, ...props }) =>
React.createElement("div", props, children);
const Text = ({ children, ...props }) =>
React.createElement("span", props, children);
const useInput = jest.fn();
const useApp = jest.fn(() => ({ exit: jest.fn() }));
module.exports = {
Box,
Text,
useInput,
useApp,
render: jest.fn(),
};