fix: correct function name in test text (#37839)

pull/37813/head
Randell Dawson 2019-11-30 15:30:10 -08:00 committed by Manish Giri
parent da99033b77
commit 58ca8ddf2a
1 changed files with 5 additions and 5 deletions

View File

@ -26,15 +26,15 @@ The <code>enqueue</code> should accept items with the format shown above (<code>
```yml
tests:
- text: Your <code>Queue</code> class should have a <code>enqueue</code> method.
- text: Your <code>PriorityQueue</code> class should have a <code>enqueue</code> method.
testString: assert((function(){var test = new PriorityQueue(); return (typeof test.enqueue === 'function')}()));
- text: Your <code>Queue</code> class should have a <code>dequeue</code> method.
- text: Your <code>PriorityQueue</code> class should have a <code>dequeue</code> method.
testString: assert((function(){var test = new PriorityQueue(); return (typeof test.dequeue === 'function')}()));
- text: Your <code>Queue</code> class should have a <code>size</code> method.
- text: Your <code>PriorityQueue</code> class should have a <code>size</code> method.
testString: assert((function(){var test = new PriorityQueue(); return (typeof test.size === 'function')}()));
- text: Your <code>Queue</code> class should have an <code>isEmpty</code> method.
- text: Your <code>PriorityQueue</code> class should have an <code>isEmpty</code> method.
testString: assert((function(){var test = new PriorityQueue(); return (typeof test.isEmpty === 'function')}()));
- text: Your PriorityQueue should correctly keep track of the current number of items using the <code>size</code> method as items are enqueued and dequeued.
- text: Your <code>PriorityQueue</code> class should correctly keep track of the current number of items using the <code>size</code> method as items are enqueued and dequeued.
testString: assert((function(){var test = new PriorityQueue(); test.enqueue(['David Brown', 2]); test.enqueue(['Jon Snow', 1]); var size1 = test.size(); test.dequeue(); var size2 = test.size(); test.enqueue(['A', 3]); test.enqueue(['B', 3]); test.enqueue(['C', 3]); return (size1 === 2 && size2 === 1 && test.size() === 4)}()));
- text: The <code>isEmpty</code> method should return <code>true</code> when the queue is empty.
testString: assert((function(){var test = new PriorityQueue(); test.enqueue(['A', 1]); test.enqueue(['B', 1]); test.dequeue(); var first = test.isEmpty(); test.dequeue(); return (!first && test.isEmpty()); }()));