update
This commit is contained in:
parent
962caebbb7
commit
87bf53d076
1825 changed files with 94929 additions and 0 deletions
16
1-js/4-data-structures/1-string/3-truncate/_js.view/test.js
Normal file
16
1-js/4-data-structures/1-string/3-truncate/_js.view/test.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
describe("truncate", function() {
|
||||
it("обрезает строку до указанной длины (включая троеточие)", function() {
|
||||
assert.equal(
|
||||
truncate("Вот, что мне хотелось бы сказать на эту тему:", 20),
|
||||
"Вот, что мне хоте..."
|
||||
);
|
||||
});
|
||||
|
||||
it("не меняет короткие строки", function() {
|
||||
assert.equal(
|
||||
truncate("Всем привет!", 20),
|
||||
"Всем привет!"
|
||||
);
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue