added a test checking for a number output to stand-in-line
This commit is contained in:
committed by
Stuart Taylor
parent
51dd09f7e8
commit
3a48daaa21
@ -2794,6 +2794,7 @@
|
||||
"var testArr = [ 1,2,3,4,5];\n\nfunction nextInLine(arr, item) {\n arr.push(item);\n return arr.shift();\n}"
|
||||
],
|
||||
"tests": [
|
||||
"assert.isNumber(nextInLine([],5), 'message: <code>nextInLine([], 5)</code> should return a number.');",
|
||||
"assert(nextInLine([],1) === 1, 'message: <code>nextInLine([], 1)</code> should return <code>1</code>');",
|
||||
"assert(nextInLine([2],1) === 2, 'message: <code>nextInLine([2], 1)</code> should return <code>2</code>');",
|
||||
"assert(nextInLine([5,6,7,8,9],1) === 5, 'message: <code>nextInLine([5,6,7,8,9], 1)</code> should return <code>5</code>');",
|
||||
|
Reference in New Issue
Block a user