mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Remove string detail check
This appears to be in use by other packages Refs atom/notifications#50
This commit is contained in:
@@ -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!')
|
||||
|
||||
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user