fix(curriculum): Remove additional unnecessary assert message argument from English Coding Interview Prep challenges (#36440)
* fix: removed more assert msg args * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com> * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com> * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com> * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com> * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com> * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com> * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com> * fix: remove single quotes wrapping testString Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com>
This commit is contained in:
committed by
Parth Parth
parent
f2df76c099
commit
ee97fa4542
@ -45,11 +45,11 @@ tests:
|
||||
- text: <code>formatText</code> is a function.
|
||||
testString: assert(typeof formatText === 'function', '<code>formatText</code> is a function.');
|
||||
- text: '<code>formatText</code> with the above input and "right" justification should produce the following: '
|
||||
testString: 'assert.strictEqual(formatText(testInput, ''right''), rightAligned, ''<code>formatText</code> with the above input and "right" justification should produce the following: '');'
|
||||
testString: 'assert.strictEqual(formatText(testInput, ''right''), rightAligned);'
|
||||
- text: '<code>formatText</code> with the above input and "left" justification should produce the following: '
|
||||
testString: 'assert.strictEqual(formatText(testInput, ''left''), leftAligned, ''<code>formatText</code> with the above input and "left" justification should produce the following: '');'
|
||||
testString: 'assert.strictEqual(formatText(testInput, ''left''), leftAligned);'
|
||||
- text: '<code>formatText</code> with the above input and "center" justification should produce the following: '
|
||||
testString: 'assert.strictEqual(formatText(testInput, ''center''), centerAligned, ''<code>formatText</code> with the above input and "center" justification should produce the following: '');'
|
||||
testString: 'assert.strictEqual(formatText(testInput, ''center''), centerAligned);'
|
||||
|
||||
```
|
||||
|
||||
|
@ -84,9 +84,9 @@ tests:
|
||||
- text: <code>dealFreeCell(seed)</code> should return an array of length 7.
|
||||
testString: assert(dealFreeCell(1).length === 7, '<code>dealFreeCell(seed)</code> should return an array of length 7.');
|
||||
- text: "<code>dealFreeCell(1)</code> should return an array identical to example \"Game #1\""
|
||||
testString: "assert.deepEqual(dealFreeCell(1), game1, '<code>dealFreeCell(1)</code> should return an array identical to example \"Game #1\"');"
|
||||
testString: "assert.deepEqual(dealFreeCell(1), game1);"
|
||||
- text: "<code>dealFreeCell(617)</code> should return an array identical to example \"Game #617\""
|
||||
testString: "assert.deepEqual(dealFreeCell(617), game617, '<code>dealFreeCell(617)</code> should return an array identical to example \"Game #617\"');"
|
||||
testString: "assert.deepEqual(dealFreeCell(617), game617);"
|
||||
|
||||
```
|
||||
|
||||
|
@ -29,7 +29,7 @@ tests:
|
||||
- text: <code>deepcopy</code> should be a function.
|
||||
testString: assert(typeof deepcopy === 'function', '<code>deepcopy</code> should be a function.');
|
||||
- text: '<code>deepcopy({test: "test"})</code> should return an object.'
|
||||
testString: 'assert(typeof deepcopy(obj1) === ''object'', ''<code>deepcopy({test: "test"})</code> should return an object.'');'
|
||||
testString: 'assert(typeof deepcopy(obj1) === ''object'');'
|
||||
- text: Should not return the same object that was provided.
|
||||
testString: assert(deepcopy(obj2) != obj2, 'Should not return the same object that was provided.');
|
||||
- text: When passed an object containing an array, should return a deep copy of the object.
|
||||
|
@ -25,7 +25,7 @@ tests:
|
||||
- text: <code>isHarshadOrNiven</code> is a function.
|
||||
testString: assert(typeof isHarshadOrNiven === 'function', '<code>isHarshadOrNiven</code> is a function.');
|
||||
- text: '<code>isHarshadOrNiven()</code> should return <code>{"firstTwenty": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42],"firstOver1000": 1002}</code>'
|
||||
testString: 'assert.deepEqual(isHarshadOrNiven(), res, ''<code>isHarshadOrNiven()</code> should return <code>{"firstTwenty": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42],"firstOver1000": 1002}</code>'');'
|
||||
testString: assert.deepEqual(isHarshadOrNiven(), res);
|
||||
|
||||
```
|
||||
|
||||
|
@ -26,17 +26,17 @@ tests:
|
||||
- text: <code>arrToObj</code> is a function.
|
||||
testString: assert(typeof arrToObj === 'function', '<code>arrToObj</code> is a function.');
|
||||
- text: '<code>arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d", "e"])</code> should return <code>{ 1: "a", 2: "b", 3: "c", 4: "d", 5: "e" }</code>'
|
||||
testString: 'assert.deepEqual(arrToObj(...testCases[0]), res[0], ''<code>arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d", "e"])</code> should return <code>{ 1: "a", 2: "b", 3: "c", 4: "d", 5: "e" }</code>'');'
|
||||
testString: assert.deepEqual(arrToObj(...testCases[0]), res[0]);
|
||||
- text: '<code>arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d"])</code> should return <code>{ 1: "a", 2: "b", 3: "c", 4: "d", 5: undefined }</code>'
|
||||
testString: 'assert.deepEqual(arrToObj(...testCases[1]), res[1], ''<code>arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d"])</code> should return <code>{ 1: "a", 2: "b", 3: "c", 4: "d", 5: undefined }</code>'');'
|
||||
testString: assert.deepEqual(arrToObj(...testCases[1]), res[1]);
|
||||
- text: '<code>arrToObj([1, 2, 3], ["a", "b", "c", "d", "e"])</code> should return <code>{ 1: "a", 2: "b", 3: "c" }</code>'
|
||||
testString: 'assert.deepEqual(arrToObj(...testCases[2]), res[2], ''<code>arrToObj([1, 2, 3], ["a", "b", "c", "d", "e"])</code> should return <code>{ 1: "a", 2: "b", 3: "c" }</code>'');'
|
||||
testString: assert.deepEqual(arrToObj(...testCases[2]), res[2]);
|
||||
- text: '<code>arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4, 5])</code> should return <code>{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": 5 }</code>'
|
||||
testString: 'assert.deepEqual(arrToObj(...testCases[3]), res[3], ''<code>arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4, 5])</code> should return <code>{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": 5 }</code>'');'
|
||||
testString: assert.deepEqual(arrToObj(...testCases[3]), res[3]);
|
||||
- text: '<code>arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4])</code> should return <code>{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": undefined }</code>'
|
||||
testString: 'assert.deepEqual(arrToObj(...testCases[4]), res[4], ''<code>arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4])</code> should return <code>{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": undefined }</code>'');'
|
||||
testString: assert.deepEqual(arrToObj(...testCases[4]), res[4]);
|
||||
- text: '<code>arrToObj(["a", "b", "c"], [1, 2, 3, 4, 5])</code> should return <code>{ "a": 1, "b": 2, "c": 3 }</code>'
|
||||
testString: 'assert.deepEqual(arrToObj(...testCases[5]), res[5], ''<code>arrToObj(["a", "b", "c"], [1, 2, 3, 4, 5])</code> should return <code>{ "a": 1, "b": 2, "c": 3 }</code>'');'
|
||||
testString: assert.deepEqual(arrToObj(...testCases[5]), res[5]);
|
||||
|
||||
```
|
||||
|
||||
|
@ -175,7 +175,7 @@ tests:
|
||||
- text: <code>hashJoin</code> is a function.
|
||||
testString: assert(typeof hashJoin === 'function', '<code>hashJoin</code> is a function.');
|
||||
- text: '<code>hashJoin([{ age: 27, name: "Jonah" }, { age: 18, name: "Alan" }, { age: 28, name: "Glory" }, { age: 18, name: "Popeye" }, { age: 28, name: "Alan" }], [{ character: "Jonah", nemesis: "Whales" }, { character: "Jonah", nemesis: "Spiders" }, { character: "Alan", nemesis: "Ghosts" }, { character:"Alan", nemesis: "Zombies" }, { character: "Glory", nemesis: "Buffy" }, { character: "Bob", nemesis: "foo" }])</code> should return <code>[{"A_age": 27,"A_name": "Jonah", "B_character": "Jonah", "B_nemesis": "Whales"}, {"A_age": 27,"A_name": "Jonah", "B_character": "Jonah", "B_nemesis": "Spiders"}, {"A_age": 18,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Ghosts"}, {"A_age": 18,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Zombies"}, {"A_age": 28,"A_name": "Glory", "B_character": "Glory", "B_nemesis": "Buffy"}, {"A_age": 28,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Ghosts"}, {"A_age": 28,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Zombies"}]</code>'
|
||||
testString: 'assert.deepEqual(hashJoin(hash1, hash2), res, ''<code>hashJoin([{ age: 27, name: "Jonah" }, { age: 18, name: "Alan" }, { age: 28, name: "Glory" }, { age: 18, name: "Popeye" }, { age: 28, name: "Alan" }], [{ character: "Jonah", nemesis: "Whales" }, { character: "Jonah", nemesis: "Spiders" }, { character: "Alan", nemesis: "Ghosts" }, { character:"Alan", nemesis: "Zombies" }, { character: "Glory", nemesis: "Buffy" }, { character: "Bob", nemesis: "foo" }])</code> should return <code>[{"A_age": 27,"A_name": "Jonah", "B_character": "Jonah", "B_nemesis": "Whales"}, {"A_age": 27,"A_name": "Jonah", "B_character": "Jonah", "B_nemesis": "Spiders"}, {"A_age": 18,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Ghosts"}, {"A_age": 18,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Zombies"}, {"A_age": 28,"A_name": "Glory", "B_character": "Glory", "B_nemesis": "Buffy"}, {"A_age": 28,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Ghosts"}, {"A_age": 28,"A_name": "Alan", "B_character": "Alan", "B_nemesis": "Zombies"}]</code>'');'
|
||||
testString: assert.deepEqual(hashJoin(hash1, hash2), res);
|
||||
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user