FAQ: Model Testing Patterns - Path Definition

This community-built FAQ covers the “Path Definition” exercise from the lesson “Model Testing Patterns”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn Testing for Web Development

FAQs on the exercise Path Definition

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Hello, This course is very good. Unfortunately, the Terminal is not working since weeks.
I reported a bug but Terminal is not working …

I’m finding the whole mongoose/MongoDB section far too brief and the steps are quite often assuming knowledge that hasn’t been taught. The outwards links to Mongoose documentation do very littel for the specific application testing we’re building. I appreciate that we’re expected to research outside the CC lesson, but isn’t this the point of taking a ‘guided’ course.

Note. I had the solution, but it wouldn’t pass on to the next step, which prompted my last message:

  1. Path Definition, step 5

const dino = new Dinosaur({
name: ‘T-rex’


Could be a bug?

I completely agree with you, @amshaw71.

This exercise requires us to create a model instance, which we didn’t learn before in this TDD course.

The relevant part of the Mongoose documentation for this exercise is this one: “Constructing Documents” (a model instance is a document).

I think you may be missing a simple indentation in you code,
here’s mine, hoping it helps:

describe('Dinosaur', () => {

  describe('#name', () => {
    it('is a String', () => {
      const dino = new Dinosaur({
        name: 'T-rex'
      assert.strictEqual(dino.name, 'T-rex');