mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-23 23:29:47 +01:00
Merge pull request #308 from Its-treason/bugfix/assert-not-being-removed
fix(#270): Fix deleted assertions & tests shown in test tab
This commit is contained in:
commit
d5ef240de6
@ -161,7 +161,7 @@ const runSingleRequest = async function (
|
||||
// run assertions
|
||||
let assertionResults = [];
|
||||
const assertions = get(bruJson, 'request.assertions');
|
||||
if (assertions && assertions.length) {
|
||||
if (assertions) {
|
||||
const assertRuntime = new AssertRuntime();
|
||||
assertionResults = assertRuntime.runAssertions(
|
||||
assertions,
|
||||
@ -185,7 +185,7 @@ const runSingleRequest = async function (
|
||||
// run tests
|
||||
let testResults = [];
|
||||
const testFile = get(bruJson, 'request.tests');
|
||||
if (testFile && testFile.length) {
|
||||
if (typeof testFile === 'string') {
|
||||
const testRuntime = new TestRuntime();
|
||||
const result = await testRuntime.runTests(
|
||||
testFile,
|
||||
@ -266,7 +266,7 @@ const runSingleRequest = async function (
|
||||
// run assertions
|
||||
let assertionResults = [];
|
||||
const assertions = get(bruJson, 'request.assertions');
|
||||
if (assertions && assertions.length) {
|
||||
if (assertions) {
|
||||
const assertRuntime = new AssertRuntime();
|
||||
assertionResults = assertRuntime.runAssertions(
|
||||
assertions,
|
||||
@ -290,7 +290,7 @@ const runSingleRequest = async function (
|
||||
// run tests
|
||||
let testResults = [];
|
||||
const testFile = get(bruJson, 'request.tests');
|
||||
if (testFile && testFile.length) {
|
||||
if (typeof testFile === 'string') {
|
||||
const testRuntime = new TestRuntime();
|
||||
const result = await testRuntime.runTests(
|
||||
testFile,
|
||||
|
@ -291,7 +291,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
|
||||
// run assertions
|
||||
const assertions = get(request, 'assertions');
|
||||
if (assertions && assertions.length) {
|
||||
if (assertions) {
|
||||
const assertRuntime = new AssertRuntime();
|
||||
const results = assertRuntime.runAssertions(
|
||||
assertions,
|
||||
@ -313,7 +313,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
|
||||
// run tests
|
||||
const testFile = item.draft ? get(item.draft, 'request.tests') : get(item, 'request.tests');
|
||||
if (testFile && testFile.length) {
|
||||
if (typeof testFile === 'string') {
|
||||
const testRuntime = new TestRuntime();
|
||||
const testResults = await testRuntime.runTests(
|
||||
testFile,
|
||||
@ -365,7 +365,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
if (error && error.response) {
|
||||
// run assertions
|
||||
const assertions = get(request, 'assertions');
|
||||
if (assertions && assertions.length) {
|
||||
if (assertions) {
|
||||
const assertRuntime = new AssertRuntime();
|
||||
const results = assertRuntime.runAssertions(
|
||||
assertions,
|
||||
@ -387,7 +387,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
|
||||
// run tests
|
||||
const testFile = item.draft ? get(item.draft, 'request.tests') : get(item, 'request.tests');
|
||||
if (testFile && testFile.length) {
|
||||
if (typeof testFile === 'string') {
|
||||
const testRuntime = new TestRuntime();
|
||||
const testResults = await testRuntime.runTests(
|
||||
testFile,
|
||||
@ -702,7 +702,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
|
||||
// run assertions
|
||||
const assertions = get(item, 'request.assertions');
|
||||
if (assertions && assertions.length) {
|
||||
if (assertions) {
|
||||
const assertRuntime = new AssertRuntime();
|
||||
const results = assertRuntime.runAssertions(
|
||||
assertions,
|
||||
@ -723,7 +723,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
|
||||
// run tests
|
||||
const testFile = item.draft ? get(item.draft, 'request.tests') : get(item, 'request.tests');
|
||||
if (testFile && testFile.length) {
|
||||
if (typeof testFile === 'string') {
|
||||
const testRuntime = new TestRuntime();
|
||||
const testResults = await testRuntime.runTests(
|
||||
testFile,
|
||||
@ -781,7 +781,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
|
||||
// run assertions
|
||||
const assertions = get(item, 'request.assertions');
|
||||
if (assertions && assertions.length) {
|
||||
if (assertions) {
|
||||
const assertRuntime = new AssertRuntime();
|
||||
const results = assertRuntime.runAssertions(
|
||||
assertions,
|
||||
@ -802,7 +802,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
|
||||
// run tests
|
||||
const testFile = item.draft ? get(item.draft, 'request.tests') : get(item, 'request.tests');
|
||||
if (testFile && testFile.length) {
|
||||
if (typeof testFile === 'string') {
|
||||
const testRuntime = new TestRuntime();
|
||||
const testResults = await testRuntime.runTests(
|
||||
testFile,
|
||||
|
Loading…
Reference in New Issue
Block a user