small medium large xlarge

Jruby_pragsmall
01 Feb 2017, 15:15
Serguei Cambour (14 posts)

May be I misunderstood the content at page 134, but after adding the stubbing of window.alert function as described, I still get the following error:

Failures:

  1) CustomerSearchComponent search A search for 'pat', three or more characters A search that fails on the back-end sets the keywords to be 'pat'
   Message:
     ReferenceError: alert is not defined
   Stacktrace:
     ReferenceError: alert is not defined
    at Array.<anonymous> (/Users/Serguei/projects/shine/webpack/CustomerSearchComponent.js:76:9)
    at /Users/Serguei/projects/shine/node_modules/testdouble/lib/store/stubbings.js:83:28
    at arrayEach (/Users/Serguei/projects/shine/node_modules/lodash/index.js:1289:13)
    at Function.<anonymous> (/Users/Serguei/projects/shine/node_modules/lodash/index.js:3345:13)
    at invokeCallbackFor (/Users/Serguei/projects/shine/node_modules/testdouble/lib/store/stubbings.js:77:14)
    at executePlan (/Users/Serguei/projects/shine/node_modules/testdouble/lib/store/stubbings.js:51:5)
    at Object.invoke (/Users/Serguei/projects/shine/node_modules/testdouble/lib/store/stubbings.js:33:14)
    at Object.testDouble [as subscribe] (/Users/Serguei/projects/shine/node_modules/testdouble/lib/function.js:37:24)
    at ng.core.Component.Class.constructor.search (/Users/Serguei/projects/shine/webpack/CustomerSearchComponent.js:71:7)
    at jasmine.Spec.<anonymous> (/Users/Serguei/projects/shine/spec/javascripts/cutomer_search_component_spec.js:112:21)

Did it suppose to work at that step or not ? Thank you.

You must be logged in to comment