Remove string detail check

This appears to be in use by other packages

Refs atom/notifications#50
This commit is contained in:
Kevin Sawicki
2015-07-07 13:29:36 -07:00
parent 3a02b54851
commit a6dfbb2804
2 changed files with 0 additions and 10 deletions

View File

@@ -16,12 +16,6 @@ describe "Notification", ->
expect(-> new Notification('error', 'message', false)).toThrow()
expect(-> new Notification('error', 'message', [])).toThrow()
it "throws an error when created with a non-string detail", ->
expect(-> new Notification('error', 'message', detail: 3)).toThrow()
expect(-> new Notification('error', 'message', detail: false)).toThrow()
expect(-> new Notification('error', 'message', detail: {})).toThrow()
expect(-> new Notification('error', 'message', detail: [])).toThrow()
describe "::getTimestamp()", ->
it "returns a Date object", ->
notification = new Notification('error', 'message!')

View File

@@ -19,9 +19,6 @@ class Notification
unless _.isObject(@options) and not _.isArray(@options)
throw new Error("Notification must be created with an options object: #{@options}")
if @options?.detail? and typeof @options.detail isnt 'string'
throw new Error("Notification must be created with string detail: #{@options.detail}")
onDidDismiss: (callback) ->
@emitter.on 'did-dismiss', callback
@@ -38,7 +35,6 @@ class Notification
getTimestamp: -> @timestamp
# Public: Retrieves the {String} detail.
getDetail: -> @options.detail
isEqual: (other) ->