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

15 lines
455 B
JavaScript
Raw Normal View History

const fs = require("fs");
const path = require("path");
const parser = require("../src/bruToJson");
2023-02-03 00:09:45 +01:00
describe("parser", () => {
it("should parse the bru file", () => {
const input = fs.readFileSync(path.join(__dirname, 'fixtures', 'request.bru'), 'utf8');
const expected = require("./fixtures/request.json");
const output = parser(input);
// console.log(JSON.stringify(output, null, 2));
expect(output).toEqual(expected);
2023-02-03 00:09:45 +01:00
});
});