Skip to content

Write tests for every high priority required schema field #6

@vitorsaa2k

Description

@vitorsaa2k
  • Goal: Have tests to ensure that every high priority field is mandatory, and its not possible to create a document without providing them. making those fields avoid null/undefined typing.

Tips on how to solve/should be solved

test("Name field should be required on crate model", async () => {
		const crate = new Crate();
		await expect(crate.save()).rejects.toThrowError(
			/^Crate validation failed: name: Path `name` is required., id: Path `id` is required.$/
		);
	});
});

To do

  1. Check if every high priority field has the required: true prop on it schema.
  2. Write test for each one of them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions