Skip to content

Commit fc04938

Browse files
committed
Fix code style
1 parent 992dc1d commit fc04938

1 file changed

Lines changed: 22 additions & 11 deletions

File tree

test.js

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ const t = require('./tickplate.js');
3434
{
3535
({
3636
description:
37-
'Fallback primitives and arrays of primitives provided, with "=" separator, empty spaces around trimmed',
37+
'Fallback primitives and arrays of primitives provided, with ' +
38+
'"=" separator, empty spaces around trimmed',
3839
});
3940

4041
const data = {
@@ -53,7 +54,8 @@ const t = require('./tickplate.js');
5354
const templ = t`${'greeting='} ${'person = "Marcus Aurelius"'}, great ${'positions =["emperor", "philosopher"]'} of Rome from ${'ruleFrom = 161'} to ${'ruleTo=180'} AD`;
5455

5556
const expect =
56-
'Ave! Lucius Verus, great brother,emperor,co-emperor of Rome from 161 to 169 AD';
57+
'Ave! Lucius Verus, great brother,emperor,' +
58+
'co-emperor of Rome from 161 to 169 AD';
5759
const result = templ(data);
5860
assert.strictEqual(result, expect);
5961
assert.strictEqual(
@@ -62,7 +64,8 @@ const t = require('./tickplate.js');
6264
);
6365
assert.strictEqual(
6466
templ({ greeting: 'Valē!!!', ruleFrom: '44 BC', ruleTo: 2023 }),
65-
'Valē!!! Marcus Aurelius, great emperor,philosopher of Rome from 44 BC to 2023 AD',
67+
'Valē!!! Marcus Aurelius, great emperor,' +
68+
'philosopher of Rome from 44 BC to 2023 AD',
6669
);
6770

6871
const messedUp = t`${'greeting= /\\/'} ${'person = " "'}, great ${'positions ="emperor", "philosopher"]]'} of Rome from ${'ruleFrom = undefined'} to ${'ruleTo==180'} AD`;
@@ -156,7 +159,8 @@ const t = require('./tickplate.js');
156159
],
157160
[
158161
{ delimiter: BigInt('0x1fffffffffffff') },
159-
'Ave! Marcus Aurelius, great emperor9007199254740991philosopher9007199254740991writer of Rome',
162+
'Ave! Marcus Aurelius, great ' +
163+
'emperor9007199254740991philosopher9007199254740991writer of Rome',
160164
'delimiter is number NaN which should be stringified to "NaN"',
161165
],
162166
[
@@ -167,25 +171,32 @@ const t = require('./tickplate.js');
167171
[
168172
{ delimiter: [', '] },
169173
'Ave! Marcus Aurelius, great emperor, philosopher, writer of Rome',
170-
'delimiter is array of single string which should be flattened and stringified',
174+
'delimiter is array of single string which should be flattened and ' +
175+
'stringified',
171176
],
172177
[
173178
{ delimiter: new Array(', human, ') },
174-
'Ave! Marcus Aurelius, great emperor, human, philosopher, human, writer of Rome',
175-
'delimiter is array of single string which should be flattened and stringified',
179+
'Ave! Marcus Aurelius, great emperor, human, philosopher, human, ' +
180+
'writer of Rome',
181+
'delimiter is array of single string which should be flattened and ' +
182+
'stringified',
176183
],
177184
[
178185
{ delimiter: new Object() },
179-
'Ave! Marcus Aurelius, great emperor[object Object]philosopher[object Object]writer of Rome',
180-
'delimiter is empty object with default serialization to "[object Object]"',
186+
'Ave! Marcus Aurelius, great emperor[object Object]philosopher' +
187+
'[object Object]writer of Rome',
188+
'delimiter is empty object with default serialization to ' +
189+
'"[object Object]"',
181190
],
182191
[
183192
{ delimiter: { toString: new Function('', 'return ", and ";') } },
184-
'Ave! Marcus Aurelius, great emperor, and philosopher, and writer of Rome',
193+
'Ave! Marcus Aurelius, great emperor, and philosopher, ' +
194+
'and writer of Rome',
185195
'delimiter is object with serialization defined',
186196
],
187197
];
188198

189-
for (const [opts, expected, message] of testcases)
199+
for (const [opts, expected, message] of testcases) {
190200
assert.strictEqual(templ(data, opts), expected, message);
201+
}
191202
}

0 commit comments

Comments
 (0)