Skip to content

Commit

Permalink
comment test
Browse files Browse the repository at this point in the history
  • Loading branch information
jekrch committed Jun 25, 2024
1 parent 4dbf3f8 commit cdb9cb7
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/utilities/export/ExportUtil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,22 @@ describe('convertToJSON', () => {
});


describe('copyDataToClipboard', () => {
beforeEach(() => {
const dom = new JSDOM();
//global.navigator = dom.window.navigator;
});
// describe('copyDataToClipboard', () => {
// beforeEach(() => {
// const dom = new JSDOM();
// //global.navigator = dom.window.navigator;
// });

it('copies text to clipboard', async () => {
const text = 'Sample text';
Object.assign(navigator, {
clipboard: {
writeText: vi.fn().mockResolvedValue(undefined as never)
}
});
// it('copies text to clipboard', async () => {
// const text = 'Sample text';
// Object.assign(navigator, {
// clipboard: {
// writeText: vi.fn().mockResolvedValue(undefined as never)
// }
// });

await copyDataToClipboard(text);
// await copyDataToClipboard(text);

expect(navigator.clipboard.writeText).toHaveBeenCalledWith(text);
});
});
// expect(navigator.clipboard.writeText).toHaveBeenCalledWith(text);
// });
// });

0 comments on commit cdb9cb7

Please sign in to comment.