ReCoded-Org / curriculum-backend-readings

Content monorepo for all the readings of the backend bootcamp curriculum developed by Re:Coded.
23 stars 4 forks source link

Module 5 feedback #27

Open louisrli opened 2 years ago

louisrli commented 2 years ago

1 Introduction to Testing

Seems fine

1.1 Testing Philosophy

Since the Given When Then section was added, I'd consider merging it with the Arrange-Act-Assert section (as it says, they are basically the same formula), perhaps a quick reference to one of them will be fine.

1.2 Types of Tests

Seems fine

2 Testing in JavaScript

Seems fine

2.1 Testing Examples

2.2 Mocking

2.3 Test Coverage

This section is fine

2.4 Static Analysis

It seems somewhat strange to me that this is under the testing section, but I suppose it doesn't fit anywhere else. I'd add a sentence somewhere about the limitations of static analysis -- code analysis can't understand everything about the code purely by analyzing it.

2.5 CI/CD

3 Testing pure functions

I think these two cases are actually the same in JS, as not passing a param causes undefined to be passed

Should return undefined when undefined value is passed as a parameter.
Should return undefined when parameter is not passed.

3.2 Testing Controllers

Weird formatting with the space before colons again, ctrl +f : (with a space before the colon)

The only thing I'd change is to emphasize that when testing API routes you should still be doing HTTP requests against a test server. For example, a test should never, ever ever be running HTTP requests against a production server.

Other assignments look good.