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

Test cases are a bit misleading #11794

Closed
Labels
status: resolved/shipping To be applied to issues or PR's that are already fixed and are awaiting DevOps deployment

Comments

@OFFLlNE
Copy link

OFFLlNE commented Nov 24, 2016

Challenge Counting Cards has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

image

My code:

var count = 0;

function cc(card) {
  // Only change code below this line
  switch(card){
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
      count += 1;
      break;
    case 7:
    case 8:
    case 9:
      count += 0;
      break;
    case 10:
    case 'J':
    case 'Q':
    case 'K':
    case 'A':
      count -= 1;
      break;
  }
  return result();
}
  function result(){
  
  if (count > 0){
    return count + " Bet";
  }
  else{
    return count + " Hold";
  }
  }
/* What I had before
if (count > 0){
    return '"' + count + " Bet" + '"';
  }
  else{
    return '"' + count + " Hold" + '"';
  }
Since the Test cases show that output has to be between "" it made me return it "0 Hold" etc, but actually I did not need ""
*/





// Add/remove calls to test your function.
// Note: Only the last will display
cc(7); cc(8); cc(9);

So overall I would suggest removing the "" from the tests

@Bouncey
Copy link
Member

Bouncey commented Nov 24, 2016

@OFFLlNE thank you for reporting this issue


Can we have a PR to remove the quotes around the expected return in the test cases

@Bouncey Bouncey added confirmed first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. help wanted Open for all. You do not need permission to work on these. labels Nov 24, 2016
@babattles
Copy link

I would like to try to solve this bug. This will be my first PR.

@abhisekp
Copy link
Member

abhisekp commented Nov 25, 2016

Thank you for reporting this issue. This has been fixed in #10225

This is a standard message notifying you that this issue is present in production, but it has been fixed in staging. Because of that, I'm closing this issue. When staging will be pushed to production again, your issue will be resolved.

If you think I'm wrong in closing this issue, please reopen it and add further clarification. Thank you, and happy coding.

@abhisekp abhisekp added status: resolved/shipping To be applied to issues or PR's that are already fixed and are awaiting DevOps deployment and removed first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. help wanted Open for all. You do not need permission to work on these. labels Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: resolved/shipping To be applied to issues or PR's that are already fixed and are awaiting DevOps deployment
Projects
None yet
5 participants