1 var assert = require('assert');
2 var eolFormatter = require('../');
4 describe('EOL-last formatter', function() {
5 it('adds newline at end of input', function() {
8 var expectedOutput = 'Hi!\n';
11 var formatterOutput = eolFormatter.stringAfter(input);
14 assert(formatterOutput, expectedOutput);
17 it('does not add newline at end of input with a newline', function() {
22 var formatterOutput = eolFormatter.stringAfter(input);
25 assert(formatterOutput, input);