2012-10-25 03:42:24 +04:00
|
|
|
describe "Pasteboard", ->
|
|
|
|
describe "write(text, metadata) and read()", ->
|
|
|
|
it "writes and reads text to/from the native pasteboard", ->
|
2013-10-30 00:54:44 +04:00
|
|
|
expect(atom.pasteboard.read()).toEqual ['initial pasteboard content']
|
|
|
|
atom.pasteboard.write('next')
|
|
|
|
expect(atom.pasteboard.read()[0]).toBe 'next'
|
2012-10-25 03:42:24 +04:00
|
|
|
|
|
|
|
it "returns metadata if the item on the native pasteboard matches the last written item", ->
|
2013-10-30 00:54:44 +04:00
|
|
|
atom.pasteboard.write('next', {meta: 'data'})
|
|
|
|
expect(atom.pasteboard.read()).toEqual ['next', {meta: 'data'}]
|