forked from extern/bruno
18 lines
339 B
JavaScript
18 lines
339 B
JavaScript
|
const parser = require("../src/index");
|
||
|
|
||
|
describe("parser", () => {
|
||
|
it("should parse headers", () => {
|
||
|
const input = `headers {
|
||
|
hello: world,
|
||
|
foo: bar
|
||
|
}`;
|
||
|
|
||
|
const expected = [
|
||
|
{ key: "hello", value: "world" },
|
||
|
{ key: "foo", value: "bar" }
|
||
|
];
|
||
|
|
||
|
expect(parser(input)).toEqual(expected);
|
||
|
});
|
||
|
});
|