Just a whole lot of crap
This commit is contained in:
18
tests/__mocks__/ink.js
Normal file
18
tests/__mocks__/ink.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// 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(),
|
||||
};
|
||||
Reference in New Issue
Block a user