Skip to content

Commit

Permalink
Formatting #4354
Browse files Browse the repository at this point in the history
  • Loading branch information
wszymanski committed Jun 29, 2017
1 parent a5c4dff commit eba66e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/helpers/templateLiteralTag.js
@@ -1,5 +1,6 @@
/**
* Tags a multiline string and return new one without line break characters and following spaces
*
* @param {Array.<String>} strings Parts of the entire string without expressions.
* @param {...String} expressions Expressions converted to strings, which are added to the entire string.
* @returns {String}
Expand Down
8 changes: 3 additions & 5 deletions test/unit/helpers/TemplateLiteralTag.spec.js
@@ -1,18 +1,16 @@
import {
toSingleLine,
} from 'handsontable/helpers/templateLiteralTag';
import {toSingleLine} from 'handsontable/helpers/templateLiteralTag';

describe('Helper for template literals', () => {

it('should strip two line string (string with whitespace at end of first line and indention at second one)', () => {
it('should strip two line string (string with whitespaces at end of first line and indention at second one)', () => {
const text = toSingleLine`Hello world Hello world Hello world Hello world Hello world Hello world Hello world
Hello world Hello world Hello world Hello world Hello world Hello world`;

expect(text).toEqual('Hello world Hello world Hello world Hello world Hello world Hello world Hello world ' +
'Hello world Hello world Hello world Hello world Hello world Hello world');
});

it('should strip two line string (string without whitespace at end of first line and indention at second one)', () => {
it('should strip two line string (string without whitespaces at end of first line and indention at second one)', () => {
const text = toSingleLine`Hello world Hello world Hello world Hello world Hello world Hello world Hello world
Hello world Hello world Hello world Hello world Hello world Hello world`;

Expand Down

0 comments on commit eba66e9

Please sign in to comment.