pegjs/spec/unit/compiler/passes/report-missing-rules.spec.js
David Majda 0847a69643 Rename the "PEG" variable to "peg"
So far, PEG.js was exported in a "PEG" global variable when no module
loader was detected. The same variable name was also conventionally used
when requiring it in Node.js or otherwise referring to it. This was
reflected in various places in the code, documentation, examples, etc.

This commit changes the variable name to "peg" and fixes all relevant
occurrences. The main reason for the change is that in Node.js, modules
are generally referred to by lower-case variable names, so "PEG" was
sticking out when used in Node.js projects.
2016-05-04 12:37:13 +02:00

18 lines
456 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: 'Referenced rule "missing" does not exist.',
location: {
start: { offset: 8, line: 1, column: 9 },
end: { offset: 15, line: 1, column: 16 }
}
});
});
});