Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function mockRuntimeContext(): Context {
const context = createContext();
context.runtime = {
isRunning: true,
environments: [],
nodes: [
{
type: 'Literal',
loc: {
start: { line: 1, column: 0 },
end: { line: 1, column: 1 }
},
value: 0,
raw: '0',
range: [0, 1]
}
]
};
export function createContext(chapter: number, externals: string[], externalContext: T) {
return createSlangContext(chapter, externals, externalContext, externalBuiltIns);
}
export function mockContext(chapter = 1): Context {
return createContext(chapter);
}