mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-20 06:36:40 +02:00
Feat/safe mode quickjs (#2848)
Safe Mode Sandbox using QuickJS Co-authored-by: Anoop M D <anoop.md1421@gmail.com> Co-authored-by: lohit <lohit.jiddimani@gmail.com>
This commit is contained in:
@@ -35,7 +35,7 @@ describe('runtime', () => {
|
||||
})
|
||||
`;
|
||||
|
||||
const runtime = new TestRuntime();
|
||||
const runtime = new TestRuntime({ runtime: 'vm2' });
|
||||
const result = await runtime.runTests(
|
||||
testFile,
|
||||
{ ...baseRequest },
|
||||
@@ -71,7 +71,7 @@ describe('runtime', () => {
|
||||
})
|
||||
`;
|
||||
|
||||
const runtime = new TestRuntime();
|
||||
const runtime = new TestRuntime({ runtime: 'vm2' });
|
||||
const result = await runtime.runTests(
|
||||
testFile,
|
||||
{ ...baseRequest },
|
||||
@@ -114,7 +114,7 @@ describe('runtime', () => {
|
||||
bru.setVar('validation', validate(new Date().toISOString()))
|
||||
`;
|
||||
|
||||
const runtime = new ScriptRuntime();
|
||||
const runtime = new ScriptRuntime({ runtime: 'vm2' });
|
||||
const result = await runtime.runRequestScript(script, { ...baseRequest }, {}, {}, '.', null, process.env);
|
||||
expect(result.runtimeVariables.validation).toBeTruthy();
|
||||
});
|
||||
@@ -160,7 +160,7 @@ describe('runtime', () => {
|
||||
bru.setVar('validation', validate(new Date().toISOString()))
|
||||
`;
|
||||
|
||||
const runtime = new ScriptRuntime();
|
||||
const runtime = new ScriptRuntime({ runtime: 'vm2' });
|
||||
const result = await runtime.runResponseScript(
|
||||
script,
|
||||
{ ...baseRequest },
|
||||
|
Reference in New Issue
Block a user