mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-05 21:48:56 +01: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)
|
||||
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 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 {
|
||||
body: {
|
||||
rawFile: bodyRawFile
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* 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
|
||||
/body
|
||||
|
||||
body(type=raw-file)
|
||||
/test/file.txt
|
||||
/body
|
||||
|
||||
script
|
||||
const foo='bar';
|
||||
/script
|
||||
|
@ -77,7 +77,8 @@ describe('bruToJson', () => {
|
||||
name: 'password',
|
||||
value: 'governingdynamics'
|
||||
}
|
||||
]
|
||||
],
|
||||
rawFile: '/test/file.txt'
|
||||
},
|
||||
script: "const foo='bar';",
|
||||
tests: "bruno.test('200 ok', () => {});"
|
||||
|
Loading…
Reference in New Issue
Block a user