var expect = require('chai').expect;
var _ = require('underscore');

describe('arrows', function() {
  it('support expression bodies', function() {
    var nums = [1,2,3];
    var squared = _.map(nums, x => x * x);
    expect(squared).to.eql([1,4,9]);
  });
});

@@ -250,13 +250,1136 @@
 );%0A  %7D);
+%0A%0A  it('support statement bodies', function() %7B%0A    var nums = %5B1,2,3%5D;%0A    var squaredEvens = _.map(nums, x =%3E %7B%0A      if (x %25 2 === 0) %7B%0A        x = x * x%0A      %7D%0A%0A      return x;%0A    %7D);%0A    expect(squaredEvens).to.eql(%5B1,4,3%5D);%0A  %7D);%0A%0A  it('can be stored in variables', function() %7B%0A    var nums = %5B1,2,3%5D;%0A    var double = x =%3E x * 2;%0A%0A    expect(_.map(nums, double)).to.eql(%5B2,4,6%5D);%0A  %7D);%0A%0A  it('can use closures', function() %7B%0A    var nums = %5B1,2,3,4,5,6,7,8,9,10%5D;%0A    var odds = %5B%5D;%0A%0A    _.each(nums, x =%3E %7B%0A      if (x %25 2 !== 0) %7B%0A        odds.push(x);%0A      %7D%0A    %7D);%0A%0A    expect(odds).to.eql(%5B1,3,5,7,9%5D);%0A  %7D);%0A%0A  it('shares the same %22this%22 as the surrounding code. Binding of lexical this is broken in V8 currently =%3E https://github.com/nodejs/io.js/issues/735', function() %7B%0A    /*%0A    var people = %5B'Rod', 'Jane', 'Freddy'%5D;%0A    var obj = %7B%0A      greeting: 'Hello, ',%0A      createGreetings: function() %7B%0A        return _.map(people, x =%3E %7B%0A          return this.greeting + x;%0A        %7D);%0A      %7D%0A    %7D%0A%0A    expect(obj.createGreetings()).to.eql(%5B'Hello, Rod', 'Hello, Jane', 'Hello, Freddy'%5D);%0A    */%0A  %7D);
 %0A%7D);%0A

Add remaining arrow tests