Testing JavaScript can be difficult.

It sometimes can be hard to write excellent tests that assert that what you developed really works.

To support you, I compiled some beginner-friendly JavaScript testing resources for you.

A thread.
1. JavaScript testing for beginners

This is a course that delivers one lesson each day to your inbox.

You can do it at your own pace.

Perfect for beginners, with some great advice.

marclittlemore.com/javascript-tes…

1/9
2. Introduction To JavaScript Unit Testing

This article is a great guide for beginners.

It walks you from your code as it might be, over making it actually testable, to finally covering it with tests.

smashingmagazine.com/2012/06/introd…

2/9
3. How To Write High-Quality Unit Tests

This article shows you how to improve your test quality by asking yourself what you write tests for.

It provides 4 simple questions you should ask yourself to improve your test quality.

marclittlemore.com/how-to-write-h…

3/9
4. Testing Asynchronous JavaScript

JavaScript is an asynchronous language. Often, even if you manage to write tests for your synchronous code, you might struggle with asynchronous logic.

This article is a little older but still valid!

martinfowler.com/articles/async…

4/9
5. How to structure your tests

Structuring tests in the best way possible can be equally as difficult as getting into testing at all.

This short article gives you a good guide for exactly this.

codeutopia.net/blog/2017/05/1…

5/9
6. Refactoring JS

This one is a whole book; an awesome one, to be honest.

It also contains chapters covering testing your JavaScript code.

Overall, a great book you should read. It could lead you to write even better code.

refactoringjs.com/files/refactor…

6/9
7. 5 Questions Every Unit Test Must Answer

This is an awesome article by Eric Elliot that teaches you a lot about testing best practices.

It also explores why you should bother with good test discipline.

medium.com/javascript-sce…

7/9
8. Thread end

That's it for this thread.

I hope you find some of the resources I shared here useful. ☺️

If there is anything, you'd like to add, please do so! Let's enhance this thread even further together. 🙏🏻

8/9
If you enjoy content like this one, follow me (@oliverjumpertz) for more. It would mean the world to me to count you to my ever-growing group of awesome online friends!

9/9

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Oliver Jumpertz

Oliver Jumpertz Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @oliverjumpertz

15 Jul
"Are there any questions left we can answer?"

"No, not right now, thank you."

Have you ever encountered this situation in an interview and responded like above?

I'm sorry, but you've given away an awesome opportunity to make a lasting impression.

A thread.
0. Foreword

I've been on both sides of the interview table for a few years now.

I've interviewed for positions, and I've interviewed quite a few awesome engineers.

I can only give you my perspective and opinion. It does not necessarily need to be fitting each situation.

1/32
1. Why this question is an opportunity

Although there is a shortage of software developers right and left, many companies still want to make sure they hire the right people.

Even the best engineers may not be the best fit for a company and its culture.

2/32
Read 33 tweets
15 Jul
Did you know that a unit test should have three basic blocks?

1. Arrange / Given
2. Act / When
3. Assert / Then

Let's quickly go over them so you get a better idea.

A thread.
1. Arrange / Given

This is where you set up everything you need to trigger the logic you want to test.

No matter whether you initialize input variables or specify the result you later expect. This is where this logic belongs.

1/10 Image
'Given' is a term coming from behavior-driven design where human-readable "user stories" are used to describe your expectations.

You can read it as: "Given this input or setup...".

2/10
Read 11 tweets
13 Jul
Let's be honest, CSS can be pretty difficult.

I had a hard time learning it, but there are a few resources that can definitely help you to understand the style language of the web.

Here is a collection of my favorite ones.

A thread.
1. codrops

An extensive CSS reference that will serve you even better than MDN.

Definitely, my go-to resource when I want to look something up.

tympanus.net/codrops/css_re…

1/11
2. The box model

Everything in HTML and CSS has something to do with a box. Some elements are block elements, others are inline elements.

This concept can actually be pretty difficult to understand.

This article on MDN makes it clear for you.

developer.mozilla.org/en-US/docs/Lea…

2/11
Read 15 tweets
12 Jul
I've created many more visual tips and explanations since I posted my last collection in June.

This is a new collection of visual tips and explanations for JavaScript that can help web developers of any skill level with even more content!

A thread.
1. The Anatomy Of A For-Loop In JavaScript .
2. The Anatomy Of A Do-While-Loop In JavaScript .
Read 40 tweets
6 Jul
Initially, coming from a class-based React context, I had a hard time understanding hooks.

And the hook I had the hardest time with was useEffect.

Gladly, I understood it, and I now want to show you what useEffect is and how you can use it.

A thread.
0. A quick hook introduction

Hooks were added to React in 16.8 and enable us to write functional components while still using state and other React features like lifecycle methods without a need for classes.

1/15
Some hooks also enable you to set state in functional components.

This doesn't sound like much, but unlike class components, where you had to modify your component's state for React to notice, you need to tell React when something changed in functional components, too.

2/15
Read 16 tweets
5 Jul
I found some awesome resources that teach you about blockchain technology.

They are short videos explaining blockchain technology to you in simple words.

A thread.
1. Asymmetric encryption

Encryption is one of the foundational building blocks of a blockchain. Knowing what it is and understanding how it works is definitely beneficial.



1/6
2. Zero Knowledge Proof

Blockchains are public databases.

Everyone decides what the truth is, and this video explains to you how it works.



2/6
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(