UNPKG

magicpatch

Version:

Adds IPython / Jupyter magic commands to IJavascript

39 lines (33 loc) 772 B
const {getMagic, testMagic} = require("./helpers/magicpatch"); const echoSource = `__%echo Source:__ \`\`\` js ${getMagic("%echo").fn.toString()} \`\`\` __File:__ `; describe("source", function() { it("question mark before", async function() { await testMagic( // magic command "??%echo", // return value undefined, // stdout [echoSource], // stderr [], ); }); it("question mark after", async function() { await testMagic( // magic command "%echo??", // return value undefined, // stdout [echoSource], // stderr [], ); }); });