1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 10:38:54 +08:00

add tests for database module #27

This commit is contained in:
lana-k
2021-04-13 11:20:15 +02:00
parent 5ba371e339
commit 13a8b33815
5 changed files with 112 additions and 9 deletions

View File

@@ -45,7 +45,7 @@ describe('csv.js', () => {
})
it('parse resolves', async () => {
Papa.parse = sinon.stub().callsFake((file, config) => {
sinon.stub(Papa, 'parse').callsFake((file, config) => {
config.complete({
data: [
[1, 'foo'],
@@ -106,7 +106,7 @@ describe('csv.js', () => {
it('parse rejects', async () => {
const err = new Error('something went wrong')
Papa.parse = sinon.stub().callsFake((file, config) => {
sinon.stub(Papa, 'parse').callsFake((file, config) => {
config.error(err)
})
const file = {}