@@ -112,17 +112,11 @@ describe('clipboard module', () => {
112
112
} ) ;
113
113
} ) ;
114
114
115
- describe ( 'clipboard.writeBuffer (format, buffer )' , ( ) => {
115
+ describe ( 'clipboard.readBuffer (format)' , ( ) => {
116
116
it ( 'writes a Buffer for the specified format' , function ( ) {
117
- if ( process . platform !== 'darwin' ) {
118
- // FIXME(alexeykuzmin): Skip the test.
119
- // this.skip()
120
- return ;
121
- }
122
-
123
117
const buffer = Buffer . from ( 'writeBuffer' , 'utf8' ) ;
124
118
clipboard . writeBuffer ( 'public.utf8-plain-text' , buffer ) ;
125
- expect ( clipboard . readText ( ) ) . to . equal ( 'writeBuffer' ) ;
119
+ expect ( buffer . equals ( clipboard . readBuffer ( 'public.utf8-plain-text' ) ) ) . to . equal ( true ) ;
126
120
} ) ;
127
121
128
122
it ( 'throws an error when a non-Buffer is specified' , ( ) => {
@@ -131,18 +125,4 @@ describe('clipboard module', () => {
131
125
} ) . to . throw ( / b u f f e r m u s t b e a n o d e B u f f e r / ) ;
132
126
} ) ;
133
127
} ) ;
134
-
135
- describe ( 'clipboard.readBuffer(format)' , ( ) => {
136
- before ( function ( ) {
137
- if ( process . platform !== 'darwin' ) {
138
- this . skip ( ) ;
139
- }
140
- } ) ;
141
-
142
- it ( 'returns a Buffer of the content for the specified format' , ( ) => {
143
- const buffer = Buffer . from ( 'this is binary' , 'utf8' ) ;
144
- clipboard . writeText ( buffer . toString ( ) ) ;
145
- expect ( buffer . equals ( clipboard . readBuffer ( 'public.utf8-plain-text' ) ) ) . to . equal ( true ) ;
146
- } ) ;
147
- } ) ;
148
128
} ) ;
0 commit comments