mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
fix line size
This commit is contained in:
@@ -134,7 +134,9 @@ describe('hint.js', () => {
|
|||||||
expect(CM.showHint.called).to.equal(false)
|
expect(CM.showHint.called).to.equal(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('getHints returns [ ] if there is only one option and the token is already completed with this option', () => {
|
it(
|
||||||
|
'getHints returns [ ] if there is only one option and token is completed with this option',
|
||||||
|
() => {
|
||||||
// mock CM.hint.sql and editor
|
// mock CM.hint.sql and editor
|
||||||
sinon.stub(CM.hint, 'sql').returns({ list: [{ text: 'SELECT' }] })
|
sinon.stub(CM.hint, 'sql').returns({ list: [{ text: 'SELECT' }] })
|
||||||
const editor = {
|
const editor = {
|
||||||
@@ -149,7 +151,8 @@ describe('hint.js', () => {
|
|||||||
|
|
||||||
const hints = getHints(editor, {})
|
const hints = getHints(editor, {})
|
||||||
expect(hints.list).to.eql([])
|
expect(hints.list).to.eql([])
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
it('getHints returns hints as is when there are more than one option', () => {
|
it('getHints returns hints as is when there are more than one option', () => {
|
||||||
// mock CM.hint.sql and editor
|
// mock CM.hint.sql and editor
|
||||||
@@ -174,7 +177,9 @@ describe('hint.js', () => {
|
|||||||
sinon.restore()
|
sinon.restore()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('getHints returns hints as is when there only one option but the token is not cpmpleted', () => {
|
it(
|
||||||
|
'getHints returns hints as is when there only one option but the token is not completed',
|
||||||
|
() => {
|
||||||
// mock CM.hint.sql and editor
|
// mock CM.hint.sql and editor
|
||||||
const list = [{ text: 'SELECT' }]
|
const list = [{ text: 'SELECT' }]
|
||||||
sinon.stub(CM.hint, 'sql').returns({ list })
|
sinon.stub(CM.hint, 'sql').returns({ list })
|
||||||
@@ -190,7 +195,8 @@ describe('hint.js', () => {
|
|||||||
|
|
||||||
const hints = getHints(editor, {})
|
const hints = getHints(editor, {})
|
||||||
expect(hints.list).to.eql(list)
|
expect(hints.list).to.eql(list)
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
it('tables is empty object when schema is null', () => {
|
it('tables is empty object when schema is null', () => {
|
||||||
// mock store state
|
// mock store state
|
||||||
|
|||||||
Reference in New Issue
Block a user