Curriculum: How to add node backend unit tests: finish slideshow

Created on 18 Dec 2018  Â·  23Comments  Â·  Source: Techtonica/curriculum

Prerequisites: #961 Done

The topic trio should include:

  • [x] ~how to label files~
  • [x] ~what, if any, packages, and how to include them in test files~
  • [x] ~how to run tests and debug in the command line.~
  • [x] ~resources for docs and examples~
  • [x] ~video~
  • [ ] slideshow should include images of all above processes, either from found video, or screenshot. The only exception is if you find a tutorial that already does this very well.

For FAQs on contributing, see https://github.com/Techtonica/curriculum

wontfix

All 23 comments

I took ~15m to read through and poke at the steps. I changed Step 2 slightly to spell out the names more explicitly, use keyword arguments instead of positional arguments (To make names of things more traceable) and add jsdoc-esque syntax for the mocking functions - https://repl.it/repls/WhirlwindTrimHandwritingrecognition.

I don't know how to run the specs tho with repl.it :(. I am unlikely to get more time to poke at this today, but I am happy to work on it (or something similar!) Wednesday when I come in and volunteer!

I want to make sure I'm spending at least ~2 of the volunteer hours with the learners, but happy to spend ~2 focusing on the curriculum.

Assign me this, I would like to fix it,

@zspencer I would love that! I will be around tomorrow afternoon. Would you tell me which repl.it the above link is an update for? BackendTesting-I, II, or III?

As for running specs, you can just make it clear in the outline that they should be using the example to actually do this on their own machine.

@alodahl Yay! Looking forward to it! The repl.it is from the second one, the one where tests are being added to the existing app. I don't know what BackEndTesting - I, II or III means atm. Do you have a specific link that would give me the context?

Unfortunately I am ... bad at planning and didn’t realize I would need my laptop to run through this. I _did_ run through the first example in repl.it; and it looks good!

Updates -

• I went through backend-i and added comments - https://repl.it/repls/DearLavishPhysics

  • I have migrated backend-ii to glitch -
    https://glitch.com/edit/#!/zee-techtonica-backend-testing-ii?path=index.js:37:0. You can run the tests by running npx mocha From the glitch console. I have also updated the README ever-so-slightly to include instructions.

Some minor notes:

  • This feels like a multi-day challenge. Anywhere from 1 to 4 days.
    • The example in backend-i starts with the API and not the User Interface. Part of me feels like it is more likely to “stick” if we start by building on the pieces of express that they are more “comfortable” (making forms and web pages) and using those forms to submit data to express. Jumping right into Postgres seems huge.
    • I would encourage authors to “group” their variables and functions in the code based upon usage. When we define a variable way before it is used, even as part of the require Blob at the top of the file, it makes it hard to figure out why the variable exists without scrolling. It also makes it easy to extract a module in production contexts

Hey @zspencer, I love this idea! But since the apprentices are going to read this tomorrow, we really just need to smooth out what's there. After tomorrow, we can totally re-think the lesson if we want, or add a more basic exercise preceeding the replit examples.

Also, did you change the lesson to include your glitch link?

Sadly I cannot edit GitHub. My notes are more for “in the future maybe” but the repl it and glitch links are safe to drop in

Sent from my iPhone

On Feb 20, 2019, at 4:48 PM, Alina L. notifications@github.com wrote:

Hey @zspencer, I love this idea! But since the apprentices are going to read this tomorrow, we really just need to smooth out what's there. After tomorrow, we can totally re-think the lesson if we want, or add a more basic exercise preceeding the replit examples.

Also, did you change the lesson to include you glitch link?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@zspencer Sweet, thank you!

@zspencer how do you run the glitch app?

Ahh I should add that to the README! You click the "Show" button with the sunglasses.

@zspencer Sure, look at the note I added next to the glitch link in the outline, and add more detail if you think it will help.

Hi @alodahl is anyone working on this?
cc @manaswinidas @Kundan28

Hi @Rita-Okonkwo remind me after you finish fixing your PR. No one is working on this now.

Hi @alodahl , can I take this up?

cc @saberprashant

Hey, Can I work on this issue @alodahl ?

@yati1998 you still need to fix #778

@Rita-Okonkwo how is this issue going? Will you be able to finish?

Hi Rita, you have had this issue for the whole month. If I don’t hear from you in the next day or 2, I will make this issue available to other participants.

Hi @alodahl , @Rita-Okonkwo confirmed that she won't be able to work on this issue now as she is busy with her school, so I think we should assign this issue to someone else now.

If this does not get done during gssoc20, I'm closing it unfinished

@vegetabill GSSoC20 has not been yet started...so it would take some time.

That whole lesson is under revision. See #1216

This is a moot issue. Closing

Was this page helpful?
0 / 5 - 0 ratings