Name 3 advantages to Test Driven Development
- Better program design and higher code quality
- Detailed project documentation
- TDD reduces the time required for project development
In what case would you need to use beforeEach() or afterEach() in a test suite?
automatically run before and after each tests,
What is one downside of Test Driven Development
What is one downside of Test Driven Development When feature changes, implementation will change as well, and many test cases will fail. ... This problem exists as long as unit test exists, but more severe especially when the test cases are written during TDD. Since during TDD process people tend to focus on implementation, the test cases are more prone to
What’s the primary difference between ES6 Classes and Constructor/Prototype Classes?
- Classes can’t be called without new, but functions intended as constructors can (and their this will be wrong)
- Classes can extend more types than constructors can (like functions and arrays)
- Classes’ prototypes are their parents (they inherit static properties); writers of constructor functions usually don’t bother with this
Why REST?
-
REST is Easy to Understand and Implement REST is meant to work over HTTP (actually HTTP was influenced by REST). Therefore it makes use of HTTP verbs that most of us know, such as GET, POST, and PUT.
-
REST Makes your Application More Scalable There are 2 main reasons why REST can help make your application more scalable:
No State As we will see in the next section (Principles of REST), one of the core principles of REST is that it's stateless on the server-side.
Faster Data Interchange Format RESTful APIs typically use JSON as the data interchange format. JSON is much more compact and smaller in size compared to XML.
- Caching is Easier with REST Caching is a critical factor for the scalability and performance of a modern web application. A well-established cache mechanism (with the best hit-rates possible) can drastically decrease the average response time of your server.
- functional programming
In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions.
-
object-oriented programming (OOP) objects are defined, each with its own properties or attributes. Each object can also contain its own procedures or methods.
-
class A class is a blueprint that defines the variables and the methods common to all objects of a certain kind
-
super the super keyword in JavaScript is used in order to call the methods of the parent class. By itself, super() is used within a constructor function to call the parent constructor function
-
Super we use this when extending the class, to inherit the previous properties from the parent class.
-
this it is a keyword in javascript that refers to the scope that will be called in.
-
jest Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase. It allows you to write tests with an approachable, familiar
-
Data Model is an abstract model that organizes elements of data and standardizes how they relate to one another