/jest-another-RPG

Week 10: OOP and TDD code walkthrough

Primary LanguageJavaScript

Jest Another RPG

Module 10 : Object Oriented Programming & Jest Testing

Command Line RPG Duel Game

In this lesson:

  • Codebase refactoring to remove areas of duplication.

  • Implemented method and property inheritance using both ES5 and ES6 syntax.

  • Converted ES5 constructor functions to ES6 classes without interrupting your test suites.

  • Implemented tests with Jest to verify proper object creation and method usage.

  • Created a test mock to eliminate dependencies on other modules.

  • Built a working command-line game using OOP structure.

  • Learned how built-in data types like arrays inherit their own methods.

  • TDD and OOP practice