We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e7f7dc commit 071264dCopy full SHA for 071264d
test/lifecycle.test.ts
@@ -5,18 +5,21 @@ describe('Lifecycle', () => {
5
it('should open and close database', () =>
6
dbRunner({ skipOpen: true }, async ({ db }) => {
7
expect(db.isOpen()).toBe(false);
8
+ expect(db.status).toBe('closed');
9
10
db.close(); // noop
11
12
db.open();
13
db.open(); // noop
14
15
expect(db.isOpen()).toBe(true);
16
+ expect(db.status).toBe('open');
17
expect(db.get('foo')).toBeUndefined();
18
19
db.close();
20
21
22
23
24
await expect(db.get('foo')).rejects.toThrow('Database not open');
25
}));
0 commit comments