

def test_get_js_from_coffee_buffer_contents_return_properly_formatted_js_when_given_valid_input(self):
    contents = ['for name in ["Toran", "Matt", "Brandon", "Joel"]\n', '  console.log(name)']
    sut.get_js_from_coffee_buffer_contents(contents)
    expected_result = ['(function() {\n', '  var name, _i, _len, _ref;\n', '\n', '  _ref = ["Toran", "Matt", "Brandon", "Joel"];\n', '  for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n', '    name = _ref[_i];\n', '    console.log(name);\n', '  }\n', '\n', '}).call(this);\n']
    actual_results = read_file_to_list(JS_FILE)[1:]
    self.assertEqual(actual_results, expected_result)

dataset/ETHPy150Open JarrodCTaylor/vim-js2coffee/tests/vim_js2coffee_tests.py VimCoffee2JSTests.test_get_js_from_coffee_buffer_contents_return_properly_formatted_js_when_given_valid_input/original