Clarify that the code generator class is not public.

This commit is contained in:
Logan Smyth
2016-04-12 21:16:34 -07:00
parent efea2c19f2
commit d042ddfdda
2 changed files with 23 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
var Whitespace = require("../lib/whitespace");
var Printer = require("../lib/printer");
var generate = require("../lib");
var assert = require("assert");
var parse = require("babylon").parse;
@@ -9,10 +10,10 @@ var _ = require("lodash");
suite("generation", function () {
test("completeness", function () {
_.each(t.VISITOR_KEYS, function (keys, type) {
assert.ok(!!generate.CodeGenerator.prototype[type], type + " should exist");
assert.ok(!!Printer.prototype[type], type + " should exist");
});
_.each(generate.CodeGenerator.prototype, function (fn, type) {
_.each(Printer.prototype, function (fn, type) {
if (!/[A-Z]/.test(type[0])) return;
assert.ok(t.VISITOR_KEYS[type], type + " should not exist");
});