Remove deprecated crashReporter.start options
authorKevin Sawicki <kevinsawicki@gmail.com>
Thu, 28 Apr 2016 16:48:13 +0000 (09:48 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Fri, 6 May 2016 17:12:53 +0000 (10:12 -0700)
lib/common/api/crash-reporter.js
spec/api-crash-reporter-spec.js

index f108875..e62c7cd 100644 (file)
@@ -10,7 +10,7 @@ var CrashReporter = (function () {
   function CrashReporter () {}
 
   CrashReporter.prototype.start = function (options) {
-    var app, args, autoSubmit, companyName, deprecate, env, extra, ignoreSystemCrashHandler, start, submitURL
+    var app, args, autoSubmit, companyName, env, extra, ignoreSystemCrashHandler, start, submitURL
     if (options == null) {
       options = {}
     }
@@ -21,14 +21,6 @@ var CrashReporter = (function () {
     ignoreSystemCrashHandler = options.ignoreSystemCrashHandler
     extra = options.extra
 
-    // Deprecated.
-    deprecate = electron.deprecate
-    if (options.submitUrl) {
-      if (submitURL == null) {
-        submitURL = options.submitUrl
-      }
-      deprecate.warn('submitUrl', 'submitURL')
-    }
     app = (process.type === 'browser' ? electron : electron.remote).app
     if (this.productName == null) {
       this.productName = app.getName()
@@ -52,11 +44,10 @@ var CrashReporter = (function () {
       extra._version = app.getVersion()
     }
     if (companyName == null) {
-      deprecate.log('companyName is now a required option to crashReporter.start')
-      return
+      throw new Error('companyName is a required option to crashReporter.start')
     }
     if (submitURL == null) {
-      deprecate.log('submitURL is now a required option to crashReporter.start')
+      throw new Error('submitURL is a required option to crashReporter.start')
       return
     }
     start = () => {
index e5a3223..4bf02af 100644 (file)
@@ -75,18 +75,18 @@ describe('crash-reporter module', function () {
     })
   })
 
-  describe('.start(options)', function () {
+  describe.only('.start(options)', function () {
     it('requires that the companyName and submitURL options be specified', function () {
       assert.throws(function () {
         crashReporter.start({
           companyName: 'Missing submitURL'
         })
-      })
+      }, /submitURL is a required option to crashReporter\.start/)
       assert.throws(function () {
         crashReporter.start({
           submitURL: 'Missing companyName'
         })
-      })
+      }, /companyName is a required option to crashReporter\.start/)
     })
   })
 })