mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-25 14:31:44 +02:00
Making syntax corrections and checking tests.
This commit is contained in:
parent
e7976e95e1
commit
f058feaee9
@ -16,7 +16,7 @@ const bodyTextBegin = regex(/^body\s*\(\s*type\s*=\s*text\s*\)\s*\r?\n/);
|
|||||||
// body(type=xml)
|
// body(type=xml)
|
||||||
const bodyXmlBegin = regex(/^body\s*\(\s*type\s*=\s*xml\s*\)\s*\r?\n/);
|
const bodyXmlBegin = regex(/^body\s*\(\s*type\s*=\s*xml\s*\)\s*\r?\n/);
|
||||||
|
|
||||||
// body(type=rawFile)
|
// body(type=raw-file)
|
||||||
const bodyRawFile = regex(/^body\s*\(\s*type\s*=\s*raw-file\s*\)\s*\r?\n/);
|
const bodyRawFile = regex(/^body\s*\(\s*type\s*=\s*raw-file\s*\)\s*\r?\n/);
|
||||||
|
|
||||||
const bodyEnd = regex(/^[\r?\n]+\/body\s*[\r?\n]*/);
|
const bodyEnd = regex(/^[\r?\n]+\/body\s*[\r?\n]*/);
|
||||||
@ -66,13 +66,13 @@ const bodyXmlTag = between(bodyXmlBegin)(bodyEnd)(everyCharUntil(bodyEnd)).map((
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const bodyRawFileTag = between(bodyRawFile)(bodyEnd)(everyCharUntil(bodyEnd)).map((bodyRawFile)) => {
|
const bodyRawFileTag = between(bodyRawFile)(bodyEnd)(everyCharUntil(bodyEnd)).map((bodyRawFile) => {
|
||||||
return {
|
return {
|
||||||
body: {
|
body: {
|
||||||
rawFile: bodyRawFile
|
rawFile: bodyRawFile
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We have deprecated form-url-encoded type in body tag, it was a misspelling on my part
|
* We have deprecated form-url-encoded type in body tag, it was a misspelling on my part
|
||||||
|
@ -50,6 +50,10 @@ body(type=multipart-form)
|
|||||||
0 password governingdynamics
|
0 password governingdynamics
|
||||||
/body
|
/body
|
||||||
|
|
||||||
|
body(type=raw-file)
|
||||||
|
/test/file.txt
|
||||||
|
/body
|
||||||
|
|
||||||
script
|
script
|
||||||
const foo='bar';
|
const foo='bar';
|
||||||
/script
|
/script
|
||||||
|
@ -77,7 +77,8 @@ describe('bruToJson', () => {
|
|||||||
name: 'password',
|
name: 'password',
|
||||||
value: 'governingdynamics'
|
value: 'governingdynamics'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
rawFile: '/test/file.txt'
|
||||||
},
|
},
|
||||||
script: "const foo='bar';",
|
script: "const foo='bar';",
|
||||||
tests: "bruno.test('200 ok', () => {});"
|
tests: "bruno.test('200 ok', () => {});"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user