mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 16:44:27 +01:00
release(#212): bru cli v0.9.0
This commit is contained in:
parent
c7aecbea79
commit
30ee472c40
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 0.9.0
|
||||
|
||||
- `--output` flag to collect the results of your API tests
|
||||
|
||||
## 0.8.0
|
||||
|
||||
- `--env-var` flag to set environment variables
|
||||
|
@ -7,7 +7,7 @@
|
||||
"passedTests": 0,
|
||||
"failedTests": 0
|
||||
},
|
||||
"requestResults": [
|
||||
"results": [
|
||||
{
|
||||
"request": {
|
||||
"method": "GET",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@usebruno/cli",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.0",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
"bru": "./bin/bru.js"
|
||||
|
@ -254,7 +254,7 @@ const handler = async function (argv) {
|
||||
const _isFile = await isFile(filename);
|
||||
let assertionResults = [];
|
||||
let testResults = [];
|
||||
let requestResults = [];
|
||||
let testrunResults = [];
|
||||
|
||||
let bruJsons = [];
|
||||
|
||||
@ -308,7 +308,7 @@ const handler = async function (argv) {
|
||||
);
|
||||
|
||||
if (result) {
|
||||
requestResults.push(result);
|
||||
testrunResults.push(result);
|
||||
const { assertionResults: _assertionResults, testResults: _testResults } = result;
|
||||
|
||||
assertionResults = assertionResults.concat(_assertionResults);
|
||||
@ -329,7 +329,7 @@ const handler = async function (argv) {
|
||||
|
||||
const outputJson = {
|
||||
summary,
|
||||
requestResults
|
||||
results: testrunResults
|
||||
};
|
||||
|
||||
fs.writeFileSync(outputPath, JSON.stringify(outputJson, null, 2));
|
||||
|
@ -171,7 +171,12 @@ const runSingleRequest = async function (
|
||||
}
|
||||
|
||||
return {
|
||||
request: request,
|
||||
request: {
|
||||
method: request.method,
|
||||
url: request.url,
|
||||
headers: request.headers,
|
||||
data: request.data
|
||||
},
|
||||
response: {
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
|
Loading…
Reference in New Issue
Block a user