fix: use nested run loop in clipboard.readImage (#39466)

This commit is contained in:
Cheng Zhao 2023-08-14 17:35:37 +09:00 committed by GitHub
parent 08bbff5361
commit cf658b700d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -16,6 +16,11 @@ ifdescribe(process.platform !== 'win32' || process.arch !== 'arm64')('clipboard
const readImage = clipboard.readImage();
expect(readImage.toDataURL()).to.equal(i.toDataURL());
});
it('works for empty image', () => {
clipboard.writeText('Not an Image');
expect(clipboard.readImage().isEmpty()).to.be.true();
});
});
describe('clipboard.readText()', () => {