import test from 'ava';
import preserveTrailingSpaceBeautify from './preserveTrailingSpaceBeautify';
test('preserveTrailingSpaceBeautify', function (t) {
  var input = "\nfunction () {\n\t\n\tfor (var i = 1; i < 10; i++) {\n\t\t\n\t\tvar obj = { brabrabrabrabrabrabrabrabrabrabrabra: \n\t\t\t'hogehogehogehogehogehogehogehogehogehogehogehoge' }  \n\t\t\n\t}\n\t\n}\n\t\t\t".trimLeft();
  var output = "\nfunction() {\n\t\n\tfor (var i = 1; i < 10; i++) {\n\t\t\n\t\tvar obj = {\n\t\t\tbrabrabrabrabrabrabrabrabrabrabrabra: 'hogehogehogehogehogehogehogehogehogehogehogehoge'\n\t\t}\n\t\t\n\t}\n\t\n}\n".trimLeft();
  var options = {
    indent_with_tabs: true,
    end_with_newline: true,
    brace_style: 'collapse-preserve-inline'
  };
  t.is(preserveTrailingSpaceBeautify(input, options), output);
});