MCPcopy Create free account
hub / github.com/MADEVAL/Oat-Table / setup

Function setup

tests/table.test.js:9–19  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

7const source = fs.readFileSync(path.resolve(__dirname, '../src/table.js'), 'utf8');
8
9function setup(body) {
10 const dom = new JSDOM(`<!doctype html><html><body>${body}</body></html>`, {
11 pretendToBeVisual: true,
12 runScripts: 'dangerously',
13 url: 'https://example.test/'
14 });
15
16 dom.window.console.warn = () => {};
17 dom.window.eval(source);
18 return dom;
19}
20
21function click(window, element) {
22 element.dispatchEvent(new window.MouseEvent('click', { bubbles: true }));

Callers 1

table.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected