mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-13 21:02:08 +08:00
Fixed "truncate a string" test that was preventing users from completing the challenge
This commit is contained in:
parent
a0427b3e18
commit
01cddba50d
@ -168,8 +168,7 @@
|
||||
],
|
||||
"challengeEntryPoint":"truncate('A-tisket a-tasket A green and yellow basket', 11);",
|
||||
"challengeSeed":"function truncate(str, num) {\n // Clear out that junk in your trunc\r\n return str;\r\n}",
|
||||
"tests":[
|
||||
"var string = 'A-tisket a-tasket A green and yellow basket’;",
|
||||
"tests": [
|
||||
"assert.strictEqual(truncate('A-tisket a-tasket A green and yellow basket’, 24), 'A-tisket…’, ’should truncate string the given length');",
|
||||
"assert.strictEqual(truncate('A-tisket a-tasket A green and yellow basket’, 'A-tisket a-tasket A green and yellow basket’.length), string, 'should not truncate if string is = length');",
|
||||
"assert.strictEqual(truncate('A-tisket a-tasket A green and yellow basket’, 'A-tisket a-tasket A green and yellow basket’.length + 2), string, 'should not truncate if string is < length');"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user