Structuring JavaScript projects for testability

preview_player
Показать описание
💖 Support the show by becoming a Patreon

💛 Wallaby (Show sponsor)

🔗 Discuss this video on the Fun Fun Forum

🔗 Watch the next Twitch stream

🔗 Code from this episode

🔗 Survey: Please tell me your opinion on this episode

🔗 mpj on Twitter

🔗 Help translate the show to your language
Рекомендации по теме
Комментарии
Автор

Really like the sandbox concept🤘. Gives a good intro to the function and code reviewers can tinker with it to help find edge cases.

FlyingOctopusKite
Автор

You should broadcast live while recording your episodes and then release it on youtube the edited/fancy version. It could possibly increase your audience and your monthly income! Keep it up mpj!

IgorLinkin
Автор

Great to see you covering this topic again.
Structuring for test-ability is one thing my team is discussing as we have just been given the all clear to start rebuilding away from legacy systems.

Thanks for the great content as always :)

jddesign
Автор

From the title of the video, I was expecting a video on project/file structure and how JS specs fit into that.

SayuStrife
Автор

It would be great if you make tutorials on JavaScript design patterns :)

naveensharma
Автор

I'm so glad to see this kind of code presented by someone that can explain stuff! I will keep this as a reference instead of trying to mumble about immutability, purity, and effectful code. Well done!

I was wondering; Do you prefer repeating names in the files instead of categorizing them in folders, or is it just due to the smaller size of the project? I think that repeating names can often make it harder to quickly refactor names, but know that many developers are used to a flat file structure.

MarcusNielsen
Автор

Thanks MPJ! Learned a new way to do dependency injection today. I like it, seems very clean =]

TheBallADP
Автор

thanks a lot mpj. one little note about the video not the content. I was rewatching the video and noticed about 13:30 the sound was out of sync with your mouth. But thank you for all effort put in the videos

salim
Автор

Really great to read this style of code. Do you believe that readability is sacrificed here? Is it worth it? Using mocks you would be able to test this logic without the injection. Perhaps you have addressed this elsewhere, I would be curious to hear your take on it. :)

joemiller
Автор

Do you work with brazilian guys? haha
"Mãe, to no print" at 10:04

guastamachia
Автор

I have a legacy application with javascript that isn't testable. I want to implement testing for it but it seems impossible. Any advice for testing un testable Javascript?

VworksArt
Автор

So I just made it through all of these videos and I can't help but wonder what happens to the project regarding dependency injection when you're ready to deploy... With things like fetch that are globally accessible from the window, must you go into each each function that has had a fakeFetch injected and remove that parameter?

dillonharless
Автор

YAY my request :D Hundreds of hours is what I'm here for :P

EightSixx
Автор

What is the plug-in for real time testing results?

AnuchitPrasertsangProfile
Автор

Hello mpj. May I ask which VS Code Theme are you using? <3

celiagomezdevillavedon
Автор

Please, tell me where I can find those wall lights.

ggodoyoliveira
Автор

great video, what about when your module have more than a few dependencies?
should all dependencies be injected?. thanks in advance.

sney
Автор

One idea for doing real world projects is to complete them and then step through the git history with us and explain each step/the important steps. I think this would still show the whole process of a project start to finish but cut down the time dramatically.

randomizednamme
Автор

Not sure about this, is it me or did miss the part about how @mpj is basically passing some type of 'identifier' to a list of functions in an array, where that function is executed because its identifier has been passed in to say I want this function 'query' to return data based on this param 'id' ?

Or are you passing in function that is then used in another function ?

Not a great fan of factory functions, but this wasn't very clear to me.

Also why does Webstorm get no love? LOL!

okbrown
Автор

At many places I have seen code like this
Array.prototype.var = some_other_var
I could not understand what is prototype.
Can you please make an video on that?
Thanks in advance buddy.

deepakdhull