Giter Club home page Giter Club logo

Comments (6)

ryanmcdermott avatar ryanmcdermott commented on May 2, 2024

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.

simondel avatar simondel commented on May 2, 2024

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.

ryanmcdermott avatar ryanmcdermott commented on May 2, 2024

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.

simondel avatar simondel commented on May 2, 2024

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.

ryanmcdermott avatar ryanmcdermott commented on May 2, 2024

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.

nicojs avatar nicojs commented on May 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.