message: Split pretty-printer completeness check into one it(...) per AST type.
diff: @@ -7,19 +7,15 @@ const hasOwn = Object.prototype.hasOwnProperty;
  // Babel 7 no longer supports Node 4 or 5.
  const nodeMajorVersion = parseInt(process.versions.node, 10);
  -(nodeMajorVersion >= 6 ? describe : xdescribe)("syntax", function () {
  - // Make sure we handle all possible node types in Syntax, and no additional
  - // types that are not present in Syntax.
  - it("Completeness", function (done) {
  +(nodeMajorVersion >= 6 ? describe : xdescribe)("Syntax", function () {
  + // Make sure the pretty-printer can print all node types currently provided by
  + // types.namedTypes.
  + describe("Pretty-printer switch (node.type) cases implemented", function () {
  const printer = path.join(__dirname, "../lib/printer.ts");
  -
  - fs.readFile(printer, "utf-8", function (err, data) {
  - assert.ok(!err);
  -
  + const data = fs.readFileSync(printer, "utf-8");
  const ast = parse(data, { parser: require("../parsers/typescript") });
  - assert.ok(ast);
  -
  const typeNames: { [name: string]: string } = {};
  +
  types.visit(ast, {
  visitFunctionDeclaration(path) {
  const decl = path.node;
  @@ -47,15 +43,12 @@ const nodeMajorVersion = parseInt(process.versions.node, 10);
  },
  });
  - for (let name in types.namedTypes) {
  - if (hasOwn.call(types.namedTypes, name)) {
  + Object.keys(types.namedTypes).forEach(name => {
  + it(name, () => {
  assert.ok(hasOwn.call(typeNames, name), "unhandled type: " + name);
  assert.strictEqual(name, typeNames[name]);
  delete typeNames[name];
  - }
  - }
  -
  - done();
  + });
  });
  });
  });
  