Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com>2018-10-09 21:03:09 +0300
committerJohann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com>2018-10-17 07:57:29 +0300
commit6f5723a169b5d400c136dbd844fc54c68e5f8563 (patch)
treee7bad2648366ed5943293655a0abe23367e869a6 /spec/javascripts/locale
parent28d412e5b2b8499fba22e8fabb1d44f44449228e (diff)
enable jasmine/new-line-before-expect
Diffstat (limited to 'spec/javascripts/locale')
-rw-r--r--spec/javascripts/locale/ensure_single_line_spec.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/javascripts/locale/ensure_single_line_spec.js b/spec/javascripts/locale/ensure_single_line_spec.js
index bbefa8f40f3..20b04cab9c8 100644
--- a/spec/javascripts/locale/ensure_single_line_spec.js
+++ b/spec/javascripts/locale/ensure_single_line_spec.js
@@ -4,6 +4,7 @@ describe('locale', () => {
describe('ensureSingleLine', () => {
it('should remove newlines at the start of the string', () => {
const result = 'Test';
+
expect(ensureSingleLine(`\n${result}`)).toBe(result);
expect(ensureSingleLine(`\t\n\t${result}`)).toBe(result);
expect(ensureSingleLine(`\r\n${result}`)).toBe(result);
@@ -14,6 +15,7 @@ describe('locale', () => {
it('should remove newlines at the end of the string', () => {
const result = 'Test';
+
expect(ensureSingleLine(`${result}\n`)).toBe(result);
expect(ensureSingleLine(`${result}\t\n\t`)).toBe(result);
expect(ensureSingleLine(`${result}\r\n`)).toBe(result);
@@ -24,6 +26,7 @@ describe('locale', () => {
it('should replace newlines in the middle of the string with a single space', () => {
const result = 'Test';
+
expect(ensureSingleLine(`${result}\n${result}`)).toBe(`${result} ${result}`);
expect(ensureSingleLine(`${result}\t\n\t${result}`)).toBe(`${result} ${result}`);
expect(ensureSingleLine(`${result}\r\n${result}`)).toBe(`${result} ${result}`);