mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-17 13:41:17 +02:00
chore(#197): ran prettier on packages/bruno-lang
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
/**
|
||||
* This test file is used to test the text parser.
|
||||
*/
|
||||
const parser = require("../src/bruToJson");
|
||||
const parser = require('../src/bruToJson');
|
||||
|
||||
describe("script parser", () => {
|
||||
it("should parse request script", () => {
|
||||
describe('script parser', () => {
|
||||
it('should parse request script', () => {
|
||||
const input = `
|
||||
script:pre-request {
|
||||
$req.setHeader('Content-Type', 'application/json');
|
||||
@ -13,14 +13,14 @@ script:pre-request {
|
||||
|
||||
const output = parser(input);
|
||||
const expected = {
|
||||
"script": {
|
||||
"req": "$req.setHeader('Content-Type', 'application/json');"
|
||||
script: {
|
||||
req: "$req.setHeader('Content-Type', 'application/json');"
|
||||
}
|
||||
};
|
||||
expect(output).toEqual(expected);
|
||||
});
|
||||
|
||||
it("should parse response script", () => {
|
||||
it('should parse response script', () => {
|
||||
const input = `
|
||||
script:post-response {
|
||||
expect(response.status).to.equal(200);
|
||||
@ -29,8 +29,8 @@ script:post-response {
|
||||
|
||||
const output = parser(input);
|
||||
const expected = {
|
||||
"script": {
|
||||
"res": "expect(response.status).to.equal(200);"
|
||||
script: {
|
||||
res: 'expect(response.status).to.equal(200);'
|
||||
}
|
||||
};
|
||||
expect(output).toEqual(expected);
|
||||
|
Reference in New Issue
Block a user