---
title: "Comment by Yashu Mittal on \"[JavaScript] Why do we need tests?\" | Hashnode"
description: "Which one is the best to use for writing tests for JavaScript &amp; Vue.js?"
url: "https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d/comment/5d035a2abf4e2c1e5aeb9e99"
---

[Discussion](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d)

Comment [\[JavaScript\] Why do we need tests?](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d)

[Yashu Mittal](https://hashnode.com/@mittalyashu)

[Jun 14, 2019](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d/comment/5d035a2abf4e2c1e5aeb9e99)

Which one is the best to use for writing tests for JavaScript & Vue.js?

[Amrit Pandey](https://hashnode.com/@ap4tt)

[Jun 14, 2019](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d/comment/5d035a2abf4e2c1e5aeb9e99#reply-5d03b5599f94cb4f567ea485)

If you are beginning Mocha is simple and good both for front-end and back-end. Vue-CLI also have built in option for Unit Testing in Mocha.

But I've heard great things about Karma.js for front-end. Source:

[https://www.youtube.com/watch?v=c9\_jw5CzMrc](https://www.youtube.com/watch?v=c9_jw5CzMrc)

[Yashu Mittal](https://hashnode.com/@mittalyashu)

[Jun 14, 2019](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d/comment/5d035a2abf4e2c1e5aeb9e99#reply-5d03cb362b1a2a7266dbb147)

Ah! Thanks for the reference.
