

def test_get_coffee_from_js_buffer_contents_return_properly_formatted_coffee_script_when_given_valid_input(self):
    contents = ['var example = function() {\n', "    console.log('This is a different example');\n", '}']
    sut.get_coffee_from_js_buffer_contents(contents)
    expected_result = ['example = ->\n', '  console.log "This is a different example"\n', '  return\n']
    actual_results = read_file_to_list(COFFEE_FILE)
    contents.assertEqual(actual_results, expected_result)

dataset/ETHPy150Open JarrodCTaylor/vim-js2coffee/tests/vim_js2coffee_tests.py VimJS2CoffeeTests.test_get_coffee_from_js_buffer_contents_return_properly_formatted_coffee_script_when_given_valid_input/VarMisuse@44/145 `self`->`contents`