In this mini-project, you will work with a group to create classes and tests for an app that generates an HTML page with a user's task list.
-
As a developer, I want to be able to define classes for different pieces of an application.
-
As a developer, I want to create tests to validate the core functionality of all classes in the application.
-
It's done when I have created a
Componentclass that takes in children, which defaults to an empty array if not provided. -
It's done when a
render()method is placed on theComponentclass that throws an error sayingChild class must implement render() method. -
It's done when a
renderInnerHTML()method is placed on theComponentclass that loops over the children and converts any that aren't strings to strings by calling theirrender()method. -
It's done when I have created a
Headerclass that inherits from theComponentclass. -
It's done when a
render()method is placed on theHeaderclass that returns a string of HTML following this format:<header class="header"><h1>Todo Today</h1><p>{DATE_HERE}</p></header>. -
It's done when I have created a
TaskListItemclass that inherits from theComponentclass. -
It's done when the
TaskListItemclass passes children to its parent class and sets apriorityproperty. -
It's done when a
render()method is placed on theTaskListItemclass and returns a string of HTML following this format:<li class="tasks-item">{INNER_HTML}</li>. -
It's done when the
render()method on theTaskListItemclass optionally places a class nametasks-item-priorityif thepriorityproperty istrue. -
It's done when I have created a
TaskListclass that inherits from theComponentclass. -
It's done when the
TaskListclass passes children to its parent class. -
It's done when a
render()method is placed on theTaskListclass and returns a string of HTML following this format:<ul class="tasks">{INNER_HTML}</ul>. -
It's done when I have created a testing suite for the
Componentclass to verify thatrender()throws an error when called directly. -
It's done when I have created a testing suite for the
Headerclass to verify the header renders correctly with the date. -
It's done when I have created a testing suite for the
TaskListItemclass that verifies that the list item renders correctly. -
It's done when the
TaskListItemclass testing suite also verifies that a priority task renders correctly. -
It's done when I have created a testing suite for the
TaskListclass that verifies the unordered list with tasks renders correctly. -
It's done when I have modified the
createDocument()method ondocument.jsto create a newHeaderclass and to addTaskListItemsto aTaskListclass. -
It's done when the
returnof thecreateDocument()method is modified to include the newly createdHeader,TaskList, andTaskListItemsclasses.
How can we set up inheritance between classes?
How can we use the toThrow() matcher from Jest to check for errors?
© 2023 Trilogy Education Services, LLC, a 2U, Inc. brand. Confidential and Proprietary. All Rights Reserved.