From 9999a8c9bc48b54c66aa21519e6f70340856f9b8 Mon Sep 17 00:00:00 2001 From: Ali Ahmed Date: Tue, 5 Feb 2019 14:44:52 +0500 Subject: [PATCH] Modify test for dequeue method to check for FIFO (#34981) * Update create-a-queue-class.english.md * Modify test for dequeue method to check for FIFO The test first `enqueue`'s two elements and checks for the `dequeue` method to return the element at `0`th index. --- .../data-structures/create-a-queue-class.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-a-queue-class.english.md b/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-a-queue-class.english.md index e4a9b2c531..2f9665c081 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-a-queue-class.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-a-queue-class.english.md @@ -34,7 +34,7 @@ tests: - text: Your Queue class should have an isEmpty method. testString: assert((function(){var test = new Queue(); return (typeof test.isEmpty === 'function')}()), 'Your Queue class should have an isEmpty method.'); - text: The dequeue method should remove and return the front element of the queue - testString: assert((function(){var test = new Queue(); test.enqueue('Smith'); return (test.dequeue() === 'Smith')}()), 'The dequeue method should remove and return the front element of the queue'); + testString: assert((function(){var test = new Queue(); test.enqueue('Smith'); test.enqueue('John'); return (test.dequeue() === 'Smith')}()), 'The dequeue method should remove and return the front element of the queue'); - text: The front method should return value of the front element of the queue testString: assert((function(){var test = new Queue(); test.enqueue('Smith'); test.enqueue('John'); return (test.front() === 'Smith')}()), 'The front method should return value of the front element of the queue'); - text: The size method should return the length of the queue