1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

#115 copy cell value

This commit is contained in:
lana-k
2023-12-27 22:22:49 +01:00
parent bc6154b9ad
commit b17040d3ef
4 changed files with 47 additions and 8 deletions

View File

@@ -7,9 +7,9 @@ describe('clipboardIo.js', async () => {
sinon.restore()
})
it('copyCsv', async () => {
it('copyText', async () => {
sinon.stub(navigator.clipboard, 'writeText').resolves(true)
await cIo.copyCsv('id\tname\r\n1\t2')
await cIo.copyText('id\tname\r\n1\t2')
expect(navigator.clipboard.writeText.calledOnceWith('id\tname\r\n1\t2'))
})