Skip to content

Commit 698f9c8

Browse files
committed
Test: Add index spec
1 parent e8b47a0 commit 698f9c8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/index.spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* eslint no-undef: "off" */
2+
const assert = require('assert')
3+
const FirestoreDBContextStore = require('..')
4+
5+
describe('index', () => {
6+
it('should reject invalid service account', () => {
7+
assert.throws(() => new FirestoreDBContextStore(),
8+
Error,
9+
'Need a valid serviceAccount.json')
10+
11+
assert.throws(() => new FirestoreDBContextStore('installedapps'),
12+
Error,
13+
'Need a valid serviceAccount.json')
14+
15+
assert.throws(() => new FirestoreDBContextStore(null, 'installedapps'),
16+
Error,
17+
'Need a valid serviceAccount.json')
18+
})
19+
})

0 commit comments

Comments
 (0)