bruno/packages/bruno-lang/v2/tests/index.spec.js

28 lines
467 B
JavaScript
Raw Normal View History

2023-02-03 00:09:45 +01:00
const parser = require("../src/index");
describe("parser", () => {
it("should parse headers", () => {
const input = `
headers {
hello: world
foo: bar
}`;
2023-02-03 00:09:45 +01:00
const output = parser(input);
console.log(output);
});
it("should parse script body", () => {
const input = `
script {
function onResponse(request, response) {
expect(response.status).to.equal(200);
}
}
`;
2023-02-03 00:09:45 +01:00
const output = parser(input);
console.log(output);
2023-02-03 00:09:45 +01:00
});
});