diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index acd3f8a90..30fe01bb4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,6 +25,7 @@ jobs: run: | npm run build --workspace=packages/bruno-common npm run build --workspace=packages/bruno-query + npm run sandbox:bundle-libraries --workspace=packages/bruno-js # tests - name: Test Package bruno-js @@ -63,6 +64,7 @@ jobs: run: | npm run build --workspace=packages/bruno-query npm run build --workspace=packages/bruno-common + npm run sandbox:bundle-libraries --workspace=packages/bruno-js - name: Run tests run: | diff --git a/packages/bruno-tests/collection/bruno.json b/packages/bruno-tests/collection/bruno.json index b6d437bbb..dff6f124d 100644 --- a/packages/bruno-tests/collection/bruno.json +++ b/packages/bruno-tests/collection/bruno.json @@ -3,19 +3,22 @@ "name": "bruno-testbench", "type": "collection", "proxy": { - "enabled": false, - "protocol": "http", - "hostname": "{{proxyHostname}}", - "port": 4000, + "bypassProxy": "", + "enabled": "global", "auth": { "enabled": false, - "username": "anoop", - "password": "password" + "username": "", + "password": "" }, - "bypassProxy": "" + "port": null, + "hostname": "", + "protocol": "http" }, "scripts": { - "moduleWhitelist": ["crypto", "buffer"], + "moduleWhitelist": [ + "crypto", + "buffer" + ], "filesystemAccess": { "allow": true } @@ -27,5 +30,9 @@ "presets": { "requestType": "http", "requestUrl": "http://localhost:6000" - } -} + }, + "ignore": [ + "node_modules", + ".git" + ] +} \ No newline at end of file diff --git a/packages/bruno-tests/collection/scripting/local modules/sum.bru b/packages/bruno-tests/collection/scripting/local modules/sum.bru index 464e51715..eeccab181 100644 --- a/packages/bruno-tests/collection/scripting/local modules/sum.bru +++ b/packages/bruno-tests/collection/scripting/local modules/sum.bru @@ -38,4 +38,22 @@ tests { "sum": 3 }); }); + + test("should return json", function() { + const data = res.getBody(); + expect(res.getBody()).to.eql({ + "a": 1, + "b": 2, + "sum": 3 + }); + }); + + test("should return json", function() { + const data = res.getBody(); + expect(res.getBody()).to.eql({ + "a": 1, + "b": 2, + "sum": 3 + }); + }); }