mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
fix tests
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
import { expect } from 'chai'
|
import chai from 'chai'
|
||||||
import sinon from 'sinon'
|
import sinon from 'sinon'
|
||||||
import csv from '@/lib/csv'
|
import csv from '@/lib/csv'
|
||||||
import Papa from 'papaparse'
|
import Papa from 'papaparse'
|
||||||
|
import chaiAsPromised from 'chai-as-promised'
|
||||||
|
|
||||||
|
chai.use(chaiAsPromised)
|
||||||
|
const expect = chai.expect
|
||||||
|
chai.should()
|
||||||
|
|
||||||
describe('csv.js', () => {
|
describe('csv.js', () => {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import { expect } from 'chai'
|
import chai from 'chai'
|
||||||
import fIo from '@/lib/utils/fileIo'
|
import fIo from '@/lib/utils/fileIo'
|
||||||
import sinon from 'sinon'
|
import sinon from 'sinon'
|
||||||
|
import chaiAsPromised from 'chai-as-promised'
|
||||||
|
|
||||||
|
chai.use(chaiAsPromised)
|
||||||
|
const expect = chai.expect
|
||||||
|
chai.should()
|
||||||
|
|
||||||
describe('fileIo.js', () => {
|
describe('fileIo.js', () => {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -560,8 +560,7 @@ describe('Inquiries.vue', () => {
|
|||||||
expect(checkboxes[0].vm.checked).to.equals(true)
|
expect(checkboxes[0].vm.checked).to.equals(true)
|
||||||
expect(checkboxes[1].vm.checked).to.equals(false)
|
expect(checkboxes[1].vm.checked).to.equals(false)
|
||||||
})
|
})
|
||||||
expect(storedInquiries.updateStorage.calledOnceWith(
|
|
||||||
sinon.match([inquiryInStorage, importedInquiry])
|
|
||||||
it('Deletion is not available for predefined inquiries', async () => {
|
it('Deletion is not available for predefined inquiries', async () => {
|
||||||
sinon.stub(storedInquiries, 'readPredefinedInquiries').resolves([
|
sinon.stub(storedInquiries, 'readPredefinedInquiries').resolves([
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user