You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test.js
+22-11Lines changed: 22 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,8 @@ const t = require('./tickplate.js');
34
34
{
35
35
({
36
36
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',
38
39
});
39
40
40
41
constdata={
@@ -53,7 +54,8 @@ const t = require('./tickplate.js');
53
54
consttempl=t`${'greeting='}${'person = "Marcus Aurelius"'}, great ${'positions =["emperor", "philosopher"]'} of Rome from ${'ruleFrom = 161'} to ${'ruleTo=180'} AD`;
54
55
55
56
constexpect=
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';
57
59
constresult=templ(data);
58
60
assert.strictEqual(result,expect);
59
61
assert.strictEqual(
@@ -62,7 +64,8 @@ const t = require('./tickplate.js');
'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',
66
69
);
67
70
68
71
constmessedUp=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');
156
159
],
157
160
[
158
161
{delimiter: BigInt('0x1fffffffffffff')},
159
-
'Ave! Marcus Aurelius, great emperor9007199254740991philosopher9007199254740991writer of Rome',
162
+
'Ave! Marcus Aurelius, great '+
163
+
'emperor9007199254740991philosopher9007199254740991writer of Rome',
160
164
'delimiter is number NaN which should be stringified to "NaN"',
161
165
],
162
166
[
@@ -167,25 +171,32 @@ const t = require('./tickplate.js');
167
171
[
168
172
{delimiter: [', ']},
169
173
'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',
171
176
],
172
177
[
173
178
{delimiter: newArray(', 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',
176
183
],
177
184
[
178
185
{delimiter: newObject()},
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]"',
181
190
],
182
191
[
183
192
{delimiter: {toString: newFunction('','return ", and ";')}},
184
-
'Ave! Marcus Aurelius, great emperor, and philosopher, and writer of Rome',
193
+
'Ave! Marcus Aurelius, great emperor, and philosopher, '+
0 commit comments