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:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user