pegjs/spec/unit/compiler/passes/report-missing-rules.spec.js
David Majda 85fb8aaa0e Grammar error messages 1/3: Improve the missing rule message
New wording is more similar to wording used in various programming
languages and it is in line with the duplicate rule message.

Part of #371.
2016-07-03 18:12:33 +02:00

18 lines
445 B
JavaScript

/* global peg */
"use strict";
describe("compiler pass |reportMissingRules|", function() {
var pass = peg.compiler.passes.check.reportMissingRules;
it("reports missing rules", function() {
expect(pass).toReportError('start = missing', {
message: 'Rule "missing" is not defined.',
location: {
start: { offset: 8, line: 1, column: 9 },
end: { offset: 15, line: 1, column: 16 }
}
});
});
});