mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
fix lint errors
This commit is contained in:
@@ -19,7 +19,6 @@ describe('fileUtils.js', () => {
|
|||||||
sinon.spy(URL, 'revokeObjectURL')
|
sinon.spy(URL, 'revokeObjectURL')
|
||||||
sinon.spy(window, 'Blob')
|
sinon.spy(window, 'Blob')
|
||||||
|
|
||||||
const str = 'foo'
|
|
||||||
fu.exportToFile('foo', 'foo.txt')
|
fu.exportToFile('foo', 'foo.txt')
|
||||||
|
|
||||||
expect(document.createElement.calledOnceWith('a')).to.equal(true)
|
expect(document.createElement.calledOnceWith('a')).to.equal(true)
|
||||||
@@ -37,7 +36,7 @@ describe('fileUtils.js', () => {
|
|||||||
|
|
||||||
expect(spyAnchor.remove.calledOnce).to.equal(true)
|
expect(spyAnchor.remove.calledOnce).to.equal(true)
|
||||||
expect(URL.revokeObjectURL.calledOnceWith(url)).to.equal(true)
|
expect(URL.revokeObjectURL.calledOnceWith(url)).to.equal(true)
|
||||||
}),
|
})
|
||||||
|
|
||||||
it('exportToFile', () => {
|
it('exportToFile', () => {
|
||||||
const spyAnchor = document.createElement('a')
|
const spyAnchor = document.createElement('a')
|
||||||
@@ -48,7 +47,6 @@ describe('fileUtils.js', () => {
|
|||||||
sinon.spy(URL, 'revokeObjectURL')
|
sinon.spy(URL, 'revokeObjectURL')
|
||||||
sinon.spy(window, 'Blob')
|
sinon.spy(window, 'Blob')
|
||||||
|
|
||||||
const str = 'foo'
|
|
||||||
fu.exportToFile('foo', 'foo.html', 'text/html')
|
fu.exportToFile('foo', 'foo.html', 'text/html')
|
||||||
|
|
||||||
expect(document.createElement.calledOnceWith('a')).to.equal(true)
|
expect(document.createElement.calledOnceWith('a')).to.equal(true)
|
||||||
|
|||||||
@@ -67,20 +67,22 @@ describe('storedQueries.js', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('serialiseQueries', () => {
|
it('serialiseQueries', () => {
|
||||||
let queryList = [
|
const queryList = [
|
||||||
{ id: 1,
|
{
|
||||||
|
id: 1,
|
||||||
name: 'foo',
|
name: 'foo',
|
||||||
query: 'SELECT from foo',
|
query: 'SELECT from foo',
|
||||||
chart: [],
|
chart: [],
|
||||||
createdAt: '2020-11-03T14:17:49.524Z',
|
createdAt: '2020-11-03T14:17:49.524Z',
|
||||||
isPredefined: true
|
isPredefined: true
|
||||||
},
|
},
|
||||||
{ id: 2,
|
{
|
||||||
|
id: 2,
|
||||||
name: 'bar',
|
name: 'bar',
|
||||||
query: 'SELECT from bar',
|
query: 'SELECT from bar',
|
||||||
chart: [],
|
chart: [],
|
||||||
createdAt: '2020-12-03T14:17:49.524Z'
|
createdAt: '2020-12-03T14:17:49.524Z'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const str = storedQueries.serialiseQueries(queryList)
|
const str = storedQueries.serialiseQueries(queryList)
|
||||||
|
|||||||
Reference in New Issue
Block a user