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

tests for logShout and logWhisper not working #2

Open
HarlemSquirrel opened this issue Jul 28, 2016 · 7 comments
Open

tests for logShout and logWhisper not working #2

HarlemSquirrel opened this issue Jul 28, 2016 · 7 comments

Comments

@HarlemSquirrel
Copy link

HarlemSquirrel commented Jul 28, 2016

Students are reporting and I can verify that these tests are showing Error: spy was never called with [ 'HELLO' ] for both functions.

Tests were updated two days ago and so it seems like an issue with spyOn.

output in terminal

> [email protected] test /home/hs/code/jw-garrison/javascript-intro-to-functions-lab-js-apply-000
> mocha -R mocha-multi --reporter-options nyan=-,json=.results.json

 5   -_-_-_-__,------,
 2   -_-_-_-__|  /\_/\ 
 0   -_-_-_-_~|_( x .x) 
     -_-_-_-_ ""  "" 

  5 passing (3s)
  2 failing

  1) logShout(string) calls console.log() its one argument in all caps:
     Error: spy was never called with [ 'HELLO' ]
      at assert (node_modules/expect/lib/assert.js:29:9)
      at Expectation.toHaveBeenCalledWith (node_modules/expect/lib/Expectation.js:333:28)
      at Context.<anonymous> (test/index-test.js:24:17)

  2) logWhisper(string) calls console.log() its one argument in all lowercase:
     Error: spy was never called with [ 'hello' ]
      at assert (node_modules/expect/lib/assert.js:29:9)
      at Expectation.toHaveBeenCalledWith (node_modules/expect/lib/Expectation.js:333:28)
      at Context.<anonymous> (test/index-test.js:36:17)
@constgoh
Copy link

Hi there, this is still happening. Please advise on what we should do.
Thanks!

@ritchey0713
Copy link

any resolve to this?

@brendangraff23
Copy link

This error might be issued because string.toUpperCase() or string.toLowerCase() was missing parentheses at the end.

@RWJL
Copy link

RWJL commented Aug 9, 2020

This error might be issued because string.toUpperCase() or string.toLowerCase() was missing parentheses at the end.
You hit the nail on the head!

@jpoze
Copy link

jpoze commented Aug 14, 2022

This happened to me, but the issue resolved when I fixed Logwhisper(String). I had erroneously put console.log(string.toLowerCase()); instead of console.log(string.toUpperCase());

The test wanted it to be whispered, and I had put it in caps. (Should have been toLowercase instead of toUppercase).

@gufu-j
Copy link

gufu-j commented Sep 9, 2022

Thanks jpoze, that really helped me. Had same issue now that suggestion fixed!, thank you

@brooke-burris
Copy link

  1. logShout(string)
    takes a string argument and logs it in all caps using console.log():
    Error: spy was never called with [ 'HELLO' ]
    at assert (node_modules/expect/lib/assert.js:29:9)
    at Expectation.toHaveBeenCalledWith (node_modules/expect/lib/Expectation.js:333:28)
    at Context. (test/indexTest.js:26:17)
    at process.processImmediate (node:internal/timers:471:21)

I am receiving this error code and none of the above suggestions have solved this problem. Any other suggestions?

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

8 participants