Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JS testing using mocks lesson #1361

Closed
alodahl opened this issue May 16, 2020 · 10 comments
Closed

Fix JS testing using mocks lesson #1361

alodahl opened this issue May 16, 2020 · 10 comments
Labels
good-first-issue Simple issue for those new to the repo or open-source in general MEDIUM Intermediate length or difficulty pinned priority get this done first if possible

Comments

@alodahl
Copy link
Collaborator

alodahl commented May 16, 2020

Fix the problems below, in the lesson: https://github.com/techtonica/curriculum/blob/main/testing-and-tdd/mocking-and-abstraction.md

Problems found in the tutorial:

  1. Materials:
    Example video (10 min) -> This link goes to www.google.com. Its not an actual link to video

  2. Other example article(20 min read) -> This article link goes to www.google.com. It does not go to an actual link.

  3. Rewrite the following to help user better understand:
    Challenge
    Following example above, try to represent the following scenarios and think about what would happen:

  • Call getUser('not-octocat')?
  • Change mockObject.id to be 42?
  • Change mockObject.name to Techtonica?

Change the explanation to:
Challenge
Hope you were able to follow the example in the earlier section. Now, take a look at the following scenarios and see if you can make the changes:

  • Call getUser('not-octocat')?
  • Change mockObject.id to be 42?
  • Change mockObject.name to Techtonica?
  1. Well, it's tricky because getTodo is still making an external call to the database which is difficult to handle. -> In this section, its hard to understand which database the author is pointing to. Readers may need more detail on the database and why making the external call is difficult and challenging.

  2. our reference TODO project) -> typo: our reference TODO project

  3. It turns out that when we want to make complex verifications around how a mock is called doing that all manually is a lot of work... that somebody else has done for us. -> This line is confusing. Need more simpler language explanation about the complex verification.

  4. Independent Practice
    It's an interesting task to implement your own mocking and validation code by hand and teaches you a lot of neat tricks. If you're feeling adventurous give that a try!
    The above section is not very helpful, and maybe redundant. Instead we can give link to example problems to practice on.

@alodahl alodahl added MEDIUM Intermediate length or difficulty gssoc20 labels May 16, 2020
@alodahl alodahl removed the gssoc20 label Jun 1, 2020
@stale
Copy link

stale bot commented Jul 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 16, 2020
@alodahl alodahl removed the wontfix label Jul 20, 2020
@stale
Copy link

stale bot commented Sep 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 3, 2020
@alodahl
Copy link
Collaborator Author

alodahl commented Sep 8, 2020

this is low priority, but there's no reason to close it.

@stale stale bot removed the wontfix label Sep 8, 2020
@stale stale bot removed the wontfix label Sep 8, 2020
@alodahl alodahl added Hacktoberfest good-first-issue Simple issue for those new to the repo or open-source in general labels Sep 14, 2020
@thisLinda
Copy link
Contributor

Hi Alina, I have completed my work on Issue 1358 (have not written the report yet) and would like to be assigned to this issue as long as you're not in a hurry. I'm starting an intern position tomorrow and anticipate the next week or so I'll be furiously treading water. I did Jasmine testing while completing Udacity's front end nanodegree course.

@sasthan
Copy link
Contributor

sasthan commented Oct 7, 2020

I would like to work on this task

@alodahl alodahl assigned sasthan and unassigned thisLinda Oct 7, 2020
sasthan added a commit to sasthan/curriculum that referenced this issue Oct 7, 2020
@sasthan
Copy link
Contributor

sasthan commented Oct 7, 2020

Problems that are in the tutorial:

  1. Materials:
    Example video (10 min) -> This link goes to www.google.com. Its not an actual link to video

  2. Other example article(20 min read) -> This article link goes to www.google.com. It does not go to an actual link.

  3. Rewrite the following to help user better understand:
    Challenge
    Following example above, try to represent the following scenarios and think about what would happen:

  • Call getUser('not-octocat')?
  • Change mockObject.id to be 42?
  • Change mockObject.name to Techtonica?

Change the explanation to:
Challenge
Hope you were able to follow the example in the earlier section. Now, take a look at the following scenarios and see if you can make the changes:

  • Call getUser('not-octocat')?
  • Change mockObject.id to be 42?
  • Change mockObject.name to Techtonica?
  1. Well, it's tricky because getTodo is still making an external call to the database which is difficult to handle. -> In this section, its hard to understand which database the author is pointing to. Readers may need more detail on the database and why making the external call is difficult and challenging.

  2. our reference TODO project) -> typo: our reference TODO project

  3. It turns out that when we want to make complex verifications around how a mock is called doing that all manually is a lot of work... that somebody else has done for us. -> This line is confusing. Need more simpler language explanation about the complex verification.

  4. Independent Practice
    It's an interesting task to implement your own mocking and validation code by hand and teaches you a lot of neat tricks. If you're feeling adventurous give that a try!
    The above section is not very helpful, and maybe redundant. Instead we can give link to example problems to practice on.

@alodahl alodahl assigned alodahl and unassigned sasthan Nov 9, 2020
@vegetabill vegetabill changed the title Follow a JS/ nock mocking tutorial yourself and note problems you encounter Fix JS testing using mocks lesson Nov 30, 2020
@alodahl alodahl added the priority get this done first if possible label Dec 7, 2020
@alodahl alodahl removed their assignment Dec 15, 2020
@severinrudie
Copy link
Contributor

1. Materials:
   Example video (10 min) -> This link goes to [www.google.com](http://www.google.com). Its not an actual link to video

2. Other example article(20 min read) -> This article link goes to [www.google.com](http://www.google.com). It does not go to an actual link.

Are there specific resources to which these are supposed to link? Or is part of this story finding new ones?

severinrudie added a commit to severinrudie/curriculum that referenced this issue Jun 26, 2021
…d-abstraction to be more clear

Note that of the problems raised in Techtonica#1361, this solves 3-7 but not 1-2.
@alodahl
Copy link
Collaborator Author

alodahl commented Jun 26, 2021

@severinrudie whoever made this file never changed the template. It doesnt mean "find one video and one article", it means this is where the materials used in the outline are gathered for easy reference, so please replace the google ones with links already in the lesson. If you have more, you can provide them along with directions on how to use the link (which section to read? how much time to spend on it? etc)

@alodahl
Copy link
Collaborator Author

alodahl commented Jun 26, 2021

Here's an example of a good Materials section: https://github.com/Techtonica/curriculum/blob/main/web/css.md

alodahl pushed a commit that referenced this issue Jul 12, 2021
…ion to be more clear (#1579)

Note that of the problems raised in #1361, this solves 3-7 but not 1-2.
@alodahl
Copy link
Collaborator Author

alodahl commented Jul 12, 2021

remaining issues moved to #1584. the rest are resolved.

@alodahl alodahl closed this as completed Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Simple issue for those new to the repo or open-source in general MEDIUM Intermediate length or difficulty pinned priority get this done first if possible
Projects
None yet
Development

No branches or pull requests

5 participants