DEV Community 👩‍💻👨‍💻

Pedro Cruz
Pedro Cruz

Posted on

How you can start create your js code if you had testing side?

Hello people,

This questions it's a little bit pain in the ass for me, but i need to understand and start to understand this.

Imagine, I had HTML, CSS and some [nameOfTheFile].model.js , this file you had some tests here.

Pretty cool here.

I see the tests and i can understand some things. But it's hard for me creating my own JS according to the tests and make them checked and right.

So, how you start to see this type of projects?

If you're confuse, please, send me a email or something and i can explain you better on hangout or something :) (at the bottom of my website, you had the email)

Many thanks,

Pedro Cruz

Top comments (3)

codevault profile image
Sergiu Mureşan

You just implement until the tests pass...

What framework are you using?

pedropcruz profile image
Pedro Cruz Author

yeah, but the code you see on tests are different what you have to implement right?

The tests are made as a logical thin for the developer, not to train other developers (in this case, a friend send to me the HTML CSS with the tests, and now i need to do the rest of the implementation: the JS part, and see if this pass's

I was clear enough? :)

No frameworks :s

Many thanks :D

codevault profile image
Sergiu Mureşan

Alright, then you need to learn how to create this functionality you speak of with vanilla JS. Of course tests are different than the actual implementation.

Classic DEV Post from 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!