Skip to content

Commit

Permalink
trim intro/outro fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed May 30, 2018
1 parent b32e32f commit 5909015
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/MagicString.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,12 @@ describe( 'MagicString', () => {
const s = new MagicString( ' abcdefghijkl ' );
assert.strictEqual( s.trim(), s );
});

it( 'should support trimming chunks with intro and outro', () => {
const s = new MagicString( ' \n' );
s.appendRight(4, 'test');
assert.strictEqual( s.trim(), 'test' );
});
});

describe( 'trimLines', () => {
Expand Down

0 comments on commit 5909015

Please sign in to comment.