Comments (6)
Looking back now after writing the Testing section, it seems that the code coverage comment has led people astray. I don't mean to say it's a silver bullet, it's just a necessary but insufficient condition to a stable codebase. I just assumed due diligence in writing good tests, as per following the rest of the guide's suggestions for testing.
Want to improve the Testing section to say something a little more accurate about code coverage?
from clean-code-javascript.
I believe mutation testing is vital to properly testing your application. Do you mind if I talk about it as well?
from clean-code-javascript.
It's a cool area, but I'm torn: I don't want to stray too far from Clean Code, but Robert C. Martin has written about it in a positive light: http://blog.cleancoder.com/uncle-bob/2016/06/10/MutationTesting.html
from clean-code-javascript.
The book Clean Code? That was last published in 2008 as far as I know. That's almost 10 years ago. Mutation testing has really been getting traction in the last two or so years.
from clean-code-javascript.
I totally understand where you're coming from, it's a cool newer idea. The issue I have is that there are plenty of engaging ideas we could pursue and recommend here, but the great thing about Clean Code, which this project is based upon, is that the ideas are older and have tons of anecdotal experience to back them up. I think one reason that this project has intrigued some people is that it feels that there are always new things that JavaScript is drawing upon, but the older and more finally polished ideas seem to be missing from guides and resources. Hopefully my position makes sense, thank you for your understanding!
from clean-code-javascript.
@ryanmcdermott I agree with you, but you could still mention that code coverage isn't the holy grail. Focusing on code coverage could become a bad practice in itself. For example, it could lead to tests without assertions. You could at least mention mutation testing as a way to prevent that from happening.
To a larger extend is see that there is no mention about the level of abstraction to use when testing. I'm talking about the testing pyramid. Would you agree that that should be part of the clean code on javascript? If so, would you mind me having a crack at it?
from clean-code-javascript.
Related Issues (20)
- Farsi translation
- The code example of <Don't ignore rejected promises> may be wrong.
- Nice HOT 4
- Contradict HOT 1
- De code HOT 5
- Js two HOT 1
- eslint plugin
- Add OSSF Scorecard security workflow
- Clean code HOT 1
- Close Issues with no description/details attached. HOT 1
- J HOT 1
- J
- I
- Clean HOT 2
- Js HOT 1
- Clean HOT 1
- Adding translations HOT 3
- CleanCode HOT 2
- JavaScript codes flower
- Query regarding code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clean-code-javascript.