#70332·freeCodeCamp

Implement a Queue - Unmentioned/Circular Dependencies Between Tests

Author: ShadyHBeddaCreated Sep 23, 2026Updated Sep 30, 2026
Labelshelp wantedscope: curriculumjs v9 cert

Describe the Issue

Context:

The instructions for the lab Implement a Queue in the JavaScript certification end with the following note:

Note: Most tests depend on the enqueue function. Implement that one first, as tests for dequeue, front, size, and isEmpty require adding elements to the queue.

Problem:

There are many other inter-function test dependencies (i.e. the tests for the correct implementation of one learner-written function calling another) that are not mentioned to the learner. Furthermore, these test dependencies are sometimes circular (tests for function1 depend on function2 and tests for function2 depend on function1).

This necessarily means that the learner will have to correctly implement multiple functions before they can pass the tests for any one of those functions. This is likely to cause some learners confusion and/or frustration, particularly if they tend towards testing each thing before moving onto the next, as many do.

Example:,

Test 2, which tests enqueue(), depends on front() and size() being correctly implemented. Test 9 (for front()) and Test 12 (for size()) in turn depend on enqueue().

Test 2:

https://github.com/freeCodeCamp/freeCodeCamp/blob/dfa7d5893cadf6323952a9dc334838101f1956e9/curriculum/challenges/english/blocks/lab-implement-a-queue/69aaafeaa4037197c75587cd.md?plain=1#L32-L40

Test 9:

https://github.com/freeCodeCamp/freeCodeCamp/blob/dfa7d5893cadf6323952a9dc334838101f1956e9/curriculum/challenges/english/blocks/lab-implement-a-queue/69aaafeaa4037197c75587cd.md?plain=1#L99-L108

Test 12:

https://github.com/freeCodeCamp/freeCodeCamp/blob/dfa7d5893cadf6323952a9dc334838101f1956e9/curriculum/challenges/english/blocks/lab-implement-a-queue/69aaafeaa4037197c75587cd.md?plain=1#L123-L135

Proposed solution:

Reduce or remove the dependencies between the different functions' tests, replacing the calls to other learner-written functions with calls to equivalent functions that "come with" the tests. If keeping any dependencies, mention them to the learner (in the instructions).

Affected Page

https://www.freecodecamp.org/learn/javascript-v9/lab-implement-a-queue/implement-a-queue

Source: freeCodeCamp/freeCodeCamp