* fix: Chinese test suite Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working. * fix: ran script, updated testStrings and solutions
2.2 KiB
2.2 KiB
id, title, isRequired, challengeType, videoUrl, localeTitle
id | title | isRequired | challengeType | videoUrl | localeTitle |
---|---|---|---|---|---|
aa7697ea2477d1316795783b | Pig Latin | true | 5 | 猪拉丁文 |
Description
Instructions
Tests
tests:
- text: <code>translatePigLatin("california")</code>应该返回“aliforniacay”。
testString: assert.deepEqual(translatePigLatin("california"), "aliforniacay");
- text: <code>translatePigLatin("paragraphs")</code>应该返回“aragraphspay”。
testString: assert.deepEqual(translatePigLatin("paragraphs"), "aragraphspay");
- text: <code>translatePigLatin("glove")</code>应该返回“oveglay”。
testString: assert.deepEqual(translatePigLatin("glove"), "oveglay");
- text: <code>translatePigLatin("algorithm")</code>应返回“algorithmway”。
testString: assert.deepEqual(translatePigLatin("algorithm"), "algorithmway");
- text: <code>translatePigLatin("eight")</code>应该返回“八通”。
testString: assert.deepEqual(translatePigLatin("eight"), "eightway");
- text: 应该处理第一个元音出现在单词末尾的单词。
testString: assert.deepEqual(translatePigLatin("schwartz"), "artzschway");
- text: 应该处理没有元音的单词。
testString: assert.deepEqual(translatePigLatin("rhythm"), "rhythmay");
Challenge Seed
function translatePigLatin(str) {
return str;
}
translatePigLatin("consonant");
Solution
// solution required