mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 16:44:27 +01:00
chore: restructure bru js package
This commit is contained in:
parent
827c480689
commit
c8de57aa51
@ -37,6 +37,8 @@ const bruToJson = (bru) => {
|
||||
"params": _.get(json, "query", []),
|
||||
"headers": _.get(json, "headers", []),
|
||||
"body": _.get(json, "body", {}),
|
||||
"vars": _.get(json, "vars", []),
|
||||
"assert": _.get(json, "assert", []),
|
||||
"script": _.get(json, "script", ""),
|
||||
"tests": _.get(json, "tests", "")
|
||||
}
|
||||
|
@ -78,7 +78,9 @@ const runSingleRequest = async function (filename, collectionPath, collectionVar
|
||||
testResults = get(result, 'results', []);
|
||||
}
|
||||
|
||||
console.log(chalk.blue(stripExtension(filename)) + chalk.dim(` (${response.status} ${response.statusText})`));
|
||||
console.log(JSON.stringify(bruJson, null, 2));
|
||||
|
||||
console.log(chalk.green(stripExtension(filename)) + chalk.dim(` (${response.status} ${response.statusText})`));
|
||||
if(testResults && testResults.length) {
|
||||
each(testResults, (testResult) => {
|
||||
if(testResult.status === 'pass') {
|
||||
|
@ -8,5 +8,8 @@
|
||||
],
|
||||
"peerDependencies": {
|
||||
"vm2": "^3.9.13"
|
||||
},
|
||||
"dependencies": {
|
||||
"json-query": "^2.2.2"
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
const {
|
||||
ScriptRuntime
|
||||
} = require('./scripts/script-runtime');
|
||||
} = require('./script-runtime');
|
||||
|
||||
const {
|
||||
TestRuntime
|
||||
} = require('./scripts/test-runtime');
|
||||
} = require('./test-runtime');
|
||||
|
||||
module.exports = {
|
||||
ScriptRuntime,
|
||||
|
Loading…
Reference in New Issue
Block a user