pegjs/spec/unit/compiler/passes/report-undefined-rules.spec.js
David Majda 400a3cfa3c Avoid aligning object keys
The only exception left are objects representing a mapping with simple
keys and values -- essentially tables written as object literals.

See #443.
2016-09-22 07:55:30 +02:00

18 lines
477 B
JavaScript

"use strict";
let peg = require("../../../../lib/peg");
describe("compiler pass |reportUndefinedRules|", function() {
let pass = peg.compiler.passes.check.reportUndefinedRules;
it("reports undefined rules", function() {
expect(pass).toReportError("start = undefined", {
message: "Rule \"undefined\" is not defined.",
location: {
start: { offset: 8, line: 1, column: 9 },
end: { offset: 17, line: 1, column: 18 }
}
});
});
});