mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
format
This commit is contained in:
@@ -24,7 +24,9 @@ describe('fileIo.js', () => {
|
||||
|
||||
expect(document.createElement.calledOnceWith('a')).to.equal(true)
|
||||
|
||||
expect(window.Blob.calledOnceWith(['foo'], { type: 'octet/stream' })).to.equal(true)
|
||||
expect(
|
||||
window.Blob.calledOnceWith(['foo'], { type: 'octet/stream' })
|
||||
).to.equal(true)
|
||||
const blob = window.Blob.returnValues[0]
|
||||
expect(URL.createObjectURL.calledOnceWith(blob)).to.equal(true)
|
||||
|
||||
@@ -49,7 +51,9 @@ describe('fileIo.js', () => {
|
||||
|
||||
expect(document.createElement.calledOnceWith('a')).to.equal(true)
|
||||
|
||||
expect(window.Blob.calledOnceWith(['foo'], { type: 'text/html' })).to.equal(true)
|
||||
expect(window.Blob.calledOnceWith(['foo'], { type: 'text/html' })).to.equal(
|
||||
true
|
||||
)
|
||||
const blob = window.Blob.returnValues[0]
|
||||
expect(URL.createObjectURL.calledOnceWith(blob)).to.equal(true)
|
||||
|
||||
@@ -74,7 +78,9 @@ describe('fileIo.js', () => {
|
||||
|
||||
sinon.stub(document, 'createElement').returns(spyInput)
|
||||
|
||||
setTimeout(() => { spyInput.dispatchEvent(new Event('change')) })
|
||||
setTimeout(() => {
|
||||
spyInput.dispatchEvent(new Event('change'))
|
||||
})
|
||||
|
||||
const data = await fIo.importFile()
|
||||
expect(data).to.equal('foo')
|
||||
@@ -108,7 +114,9 @@ describe('fileIo.js', () => {
|
||||
sinon.stub(window, 'FileReader').returns(r)
|
||||
|
||||
const blob = new Blob(['foo'])
|
||||
await expect(fIo.readAsArrayBuffer(blob)).to.be.rejectedWith('Problem parsing input file.')
|
||||
await expect(fIo.readAsArrayBuffer(blob)).to.be.rejectedWith(
|
||||
'Problem parsing input file.'
|
||||
)
|
||||
})
|
||||
|
||||
it('isJSON', () => {
|
||||
|
||||
Reference in New Issue
Block a user