mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-16 11:57:59 +02:00
chore(#197): ran prettier on packages/bruno-lang
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const {
|
||||
bruToJson
|
||||
} = require('../src');
|
||||
const { bruToJson } = require('../src');
|
||||
|
||||
describe('bruToJson', () => {
|
||||
it('should parse .bru file contents', () => {
|
||||
@ -11,81 +9,81 @@ describe('bruToJson', () => {
|
||||
const result = bruToJson(requestFile);
|
||||
|
||||
expect(result).toEqual({
|
||||
"type": "http-request",
|
||||
"name": "Send Bulk SMS",
|
||||
"seq": 1,
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"url": "https://api.textlocal.in/bulk_json?apiKey=secret=&numbers=919988776655&message=hello&sender=600010",
|
||||
"params": [
|
||||
type: 'http-request',
|
||||
name: 'Send Bulk SMS',
|
||||
seq: 1,
|
||||
request: {
|
||||
method: 'GET',
|
||||
url: 'https://api.textlocal.in/bulk_json?apiKey=secret=&numbers=919988776655&message=hello&sender=600010',
|
||||
params: [
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "apiKey",
|
||||
"value": "secret"
|
||||
enabled: true,
|
||||
name: 'apiKey',
|
||||
value: 'secret'
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "numbers",
|
||||
"value": "998877665"
|
||||
enabled: true,
|
||||
name: 'numbers',
|
||||
value: '998877665'
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "message",
|
||||
"value": "hello"
|
||||
enabled: true,
|
||||
name: 'message',
|
||||
value: 'hello'
|
||||
}
|
||||
],
|
||||
"headers": [
|
||||
headers: [
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "content-type",
|
||||
"value": "application/json"
|
||||
enabled: true,
|
||||
name: 'content-type',
|
||||
value: 'application/json'
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "accept-language",
|
||||
"value": "en-US,en;q=0.9,hi;q=0.8"
|
||||
enabled: true,
|
||||
name: 'accept-language',
|
||||
value: 'en-US,en;q=0.9,hi;q=0.8'
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"name": "transaction-id",
|
||||
"value": "{{transactionId}}"
|
||||
enabled: false,
|
||||
name: 'transaction-id',
|
||||
value: '{{transactionId}}'
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "json",
|
||||
"json": '{\n "apikey": "secret",\n "numbers": "+91998877665"\n}',
|
||||
"graphql": {
|
||||
"query": "{\n launchesPast {\n launch_success\n }\n}"
|
||||
body: {
|
||||
mode: 'json',
|
||||
json: '{\n "apikey": "secret",\n "numbers": "+91998877665"\n}',
|
||||
graphql: {
|
||||
query: '{\n launchesPast {\n launch_success\n }\n}'
|
||||
},
|
||||
"text": "Hello, there. You must be from the past",
|
||||
"xml": "<body>back to the ice age</body>",
|
||||
"formUrlEncoded": [
|
||||
text: 'Hello, there. You must be from the past',
|
||||
xml: '<body>back to the ice age</body>',
|
||||
formUrlEncoded: [
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "username",
|
||||
"value": "john"
|
||||
enabled: true,
|
||||
name: 'username',
|
||||
value: 'john'
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"name": "password",
|
||||
"value": "{{password}}"
|
||||
enabled: false,
|
||||
name: 'password',
|
||||
value: '{{password}}'
|
||||
}
|
||||
],
|
||||
"multipartForm": [
|
||||
multipartForm: [
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "username",
|
||||
"value": "nash"
|
||||
enabled: true,
|
||||
name: 'username',
|
||||
value: 'nash'
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"name": "password",
|
||||
"value": "governingdynamics"
|
||||
enabled: false,
|
||||
name: 'password',
|
||||
value: 'governingdynamics'
|
||||
}
|
||||
]
|
||||
},
|
||||
"script": "const foo='bar';",
|
||||
"tests": "bruno.test('200 ok', () => {});"
|
||||
script: "const foo='bar';",
|
||||
tests: "bruno.test('200 ok', () => {});"
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -113,8 +111,8 @@ seq 1
|
||||
params: [],
|
||||
headers: [],
|
||||
body: { mode: 'none' },
|
||||
script: "",
|
||||
tests: ""
|
||||
script: '',
|
||||
tests: ''
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user