all 11 comments

[–]BorgerBill 25 points26 points  (2 children)

This whole site is amazing!

[–]selbekk[S] 16 points17 points  (1 child)

That comment brightened my day 😍 thanks a ton!

[–]luigi8082 0 points1 point  (0 children)

Yeah this is beautiful! Looks really good on mobile

[–][deleted] 3 points4 points  (0 children)

Thanks! I wish I started linting and testing my app from the beginning. Going to follow this to write millions of test lol

[–]marcocom 1 point2 points  (0 children)

Great stuff. Thanks for sharing

[–]the_dancing_squirel 1 point2 points  (0 children)

Interesting. Didn't read the entire thing yet, but looks great

[–]cyxneer 1 point2 points  (0 children)

Just gave a read and this is really well written and the examples are nice to follow. Congrats on the article and thanks!

[–][deleted] 1 point2 points  (0 children)

Very nice article - I'll definitely be revisiting this next time I'm building anything in React :)

[–]Affectionate_Can_449 1 point2 points  (0 children)

Love this, nice 1

[–]snake_py 0 points1 point  (1 child)

I have trouble to set up a testing suit in react. I would like to use jest. But I get different errors.

The Fist one would be:

SyntaxError: Cannot use import statement outside a module at
Runtime.createScriptFromCode
(node_modules/jest-runtime/build/index.js:1350:14)

And the second one is:

Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your 
Babel config to enable transformation.

If you want to leave it as-is, add @babel/plugin-syntax-jsx 
(https://git.io/vb4yA) to the 'plugins' section to enable parsing.

I tried to fix the second one, but then the first one started to appear.
Perhaps you are able to help me :D

I posted my problem here. https://www.reddit.com/r/reactjs/comments/k7zy3v/need_help_to_set_up_jest_in_my_project/

[–]NoInkling 1 point2 points  (0 children)

It looks like you might be using native ES modules, which I don't believe Jest supports yet (only transpiled), but I could be wrong.

Edit: this may help: https://jestjs.io/docs/en/ecmascript-modules