Code coverage report for 6to5/lib/6to5/transformation/transformers/spec-no-for-in-of-assignment.js

Statements: 100% (7 / 7)      Branches: 100% (4 / 4)      Functions: 100% (1 / 1)      Lines: 100% (6 / 6)      Ignored: none     

All files » 6to5/lib/6to5/transformation/transformers/ » spec-no-for-in-of-assignment.js
1 2 3 4 5 6 7 8 9 10 111   1   856 856 640 640      
var t = require("../../types");
 
exports.ForInStatement =
exports.ForOfStatement = function (node, parent, file) {
  var left = node.left;
  if (t.isVariableDeclaration(left)) {
    var declar = left.declarations[0];
    if (declar.init) throw file.errorWithNode(declar, "No assignments allowed in for-in/of head");
  }
};