mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-19 23:17:16 +03:00
83d6c09b10
Decaffeinate the following files. * atom-protocol-handler * babel-spec * buffered-node-process * buffered-process * clipboard * context-menu-manager * decoration-manager * default-directory-provider * deserializer-manager * file-system-blob-store * keymap-extensions * menu-manager * module-cache * pane-axis-element * pane-container-element * pane-element * package-spec * squirel-update * styles-element-spec * task-spec * typescript-spec * spec-helper-platform
18 lines
725 B
JavaScript
18 lines
725 B
JavaScript
describe('Clipboard', () =>
|
|
describe('write(text, metadata) and read()', function() {
|
|
it('writes and reads text to/from the native clipboard', function() {
|
|
expect(atom.clipboard.read()).toBe('initial clipboard content');
|
|
atom.clipboard.write('next');
|
|
expect(atom.clipboard.read()).toBe('next');
|
|
});
|
|
|
|
return it('returns metadata if the item on the native clipboard matches the last written item', function() {
|
|
atom.clipboard.write('next', { meta: 'data' });
|
|
expect(atom.clipboard.read()).toBe('next');
|
|
expect(atom.clipboard.readWithMetadata().text).toBe('next');
|
|
expect(atom.clipboard.readWithMetadata().metadata).toEqual({
|
|
meta: 'data'
|
|
});
|
|
});
|
|
}));
|