From 46017a6c505642643a623a7d5bb666c6b38a893e Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Wed, 4 Sep 2024 11:20:03 +0530 Subject: [PATCH] chore: removed collection vars test as cli support is not yet ready --- .../collection/scripting/js/vars asserts.bru | 39 --------------- .../string interpolation/pre-vars.bru | 48 ------------------- 2 files changed, 87 deletions(-) delete mode 100644 packages/bruno-tests/collection/scripting/js/vars asserts.bru delete mode 100644 packages/bruno-tests/collection/string interpolation/pre-vars.bru diff --git a/packages/bruno-tests/collection/scripting/js/vars asserts.bru b/packages/bruno-tests/collection/scripting/js/vars asserts.bru deleted file mode 100644 index e4bf9e97b..000000000 --- a/packages/bruno-tests/collection/scripting/js/vars asserts.bru +++ /dev/null @@ -1,39 +0,0 @@ -meta { - name: vars asserts - type: http - seq: 5 -} - -post { - url: {{host}}/api/echo/json - body: json - auth: none -} - -body:json { - { - "boolean": false, - "number": 1, - "string": "bruno", - "array": [1, 2, 3, 4, 5], - "object": { - "hello": "bruno" - }, - "null": null - } -} - -vars:pre-request { - vars_asserts__request_var: vars_asserts__request_var__value -} - -assert { - vars_asserts__request_var: eq vars_asserts__request_var__value - vars_asserts__runtime_var: eq vars_asserts__runtime_var__value - vars_asserts__env_var: eq vars_asserts__env_var__value -} - -script:pre-request { - bru.setVar('vars_asserts__runtime_var', 'vars_asserts__runtime_var__value'); - bru.setEnvVar('vars_asserts__env_var', 'vars_asserts__env_var__value'); -} diff --git a/packages/bruno-tests/collection/string interpolation/pre-vars.bru b/packages/bruno-tests/collection/string interpolation/pre-vars.bru deleted file mode 100644 index 9a6d8d8f4..000000000 --- a/packages/bruno-tests/collection/string interpolation/pre-vars.bru +++ /dev/null @@ -1,48 +0,0 @@ -meta { - name: pre-vars - type: http - seq: 5 -} - -get { - url: {{host}}/ping - body: none - auth: none -} - -headers { - request_pre_var: {{request_pre_var}} -} - -vars:pre-request { - request_pre_var: {{folder_pre_var}} - request_pre_var_token: request_pre_var_token_value - request_pre_var_1: request_pre_var_1_value - request_pre_var_2: {{request_pre_var_1}} -} - -assert { - collection_pre_var: eq collection_pre_var_value - folder_pre_var: eq folder_pre_var_value -} - -tests { - test("collection pre var bru function", function() { - expect(bru.getCollectionVar('collection_pre_var')).to.eql('collection_pre_var_value'); - }); - - - test("folder pre var bru function", function() { - expect(bru.getFolderVar('folder_pre_var')).to.eql('folder_pre_var_value'); - }); - - - test("request pre var bru function", function() { - expect(bru.getRequestVar('request_pre_var')).to.eql('folder_pre_var_value'); - }); - - test("request pre var self-interpoaltion", function() { - expect(bru.getRequestVar('request_pre_var_2')).to.eql('request_pre_var_1_value'); - }); - -}