Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/265#discussion_r95645698 --- Diff: spec/cli.spec.js --- @@ -134,11 +134,11 @@ describe("cordova cli", function () { describe("create", function () { beforeEach(function () { - spyOn(cordova.raw, "create").andReturn(Q()); - spyOn(cordova_lib, "CordovaError"); + spyOn(cordova.raw, "create").and.returnValue(Q()); + // spyOn(cordova_lib, "CordovaError"); --- End diff -- yes @stevengill ... it gives this error ``` Error: <spyOn> : CordovaError is not declared writable or has no setter Usage: spyOn(<object>, <methodName>) ``` Is this line still needed? I tried using this to fix it, but that did not work. ``` Object.defineProperty(cordova_lib, "CordovaError", { writable: true }); ``` I've seen some people fix it like this too, but not sure if this is correct. ``` var descriptor = Object.getOwnPropertyDescriptor(obj, methodName); if (!(descriptor.writable || descriptor.set)) { throw new Error(methodName + ' is not declared writable or has no setter'); } ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org