MCPcopy Index your code
hub / github.com/Sandpack/nodebox-runtime / runExample

Function runExample

tests/index.ts:86–97  ·  view source on GitHub ↗
({ page }, use)

Source from the content-addressed store, hash-verified

84 },
85
86 async runExample({ page }, use) {
87 await use(async (exampleFilePath) => {
88 const emulatorUrl = EMULATOR_URL;
89 const content = await readFile(exampleFilePath, 'utf8');
90
91 page.mainFrame().addScriptTag({ content });
92
93 await page.evaluate(async (emulatorUrl) => {
94 await window.runExample(emulatorUrl);
95 }, emulatorUrl);
96 });
97 },
98});
99
100export { test, expect };

Callers 10

fastify.test.tsFile · 0.85
vite.start.test.tsFile · 0.85
next.start.test.tsFile · 0.85
express.test.tsFile · 0.85
multiple.test.tsFile · 0.85
nodemon.test.tsFile · 0.85

Calls 1

runExampleMethod · 0.65

Tested by

no test coverage detected