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

Confirm the Ending: Add test case #4267

Closed
geoff-wasilwa opened this issue Nov 9, 2015 · 2 comments
Closed

Confirm the Ending: Add test case #4267

geoff-wasilwa opened this issue Nov 9, 2015 · 2 comments
Assignees

Comments

@geoff-wasilwa
Copy link

I wrote a function that checks if target exists in the last string of str, and all test were passing. I called the same function with end("He has to give me a new name", "na") expecting false, but it was true. I think a new test case should be added for this scenario.

@ooade
Copy link

ooade commented Nov 9, 2015

Can you post the code here?

@ltegman ltegman added the status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. label Nov 9, 2015
@geoff-wasilwa
Copy link
Author

function end(str, target) {
  // "Never give up and good luck will find you."
  // -- Falcor
  if (str.indexOf(' ') > -1) {
    str = str.split(' ');
  }
  var lastVal = str[str.length - 1];
  return lastVal.indexOf(target) > -1;
}

end("He has to give me a new name", "na");

//-->This returns true and should be false

@ltegman ltegman removed the status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. label Nov 10, 2015
@SaintPeter SaintPeter self-assigned this Nov 10, 2015
@SaintPeter SaintPeter added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Nov 11, 2015
@BerkeleyTrue BerkeleyTrue removed the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants