1 changed files with 25 additions and 3 deletions
@ -1,7 +1,29 @@ |
|||
import { initDB } from "../src/realm/dbInit"; |
|||
|
|||
test('Realm DB inits', async () => { |
|||
let realmDB = await initDB(); |
|||
test('Realm DB inits', () => { |
|||
return initDB('negTest', 'negTest') |
|||
.then( (dbRef) => { |
|||
expect(dbRef).toEqual(expect.anything()); |
|||
}); |
|||
}); |
|||
|
|||
expect |
|||
test('Realm DB inits with no existing key', () => { |
|||
return initDB('isNull', 'isNull') |
|||
.then( (dbRef) => { |
|||
expect(dbRef).toEqual(expect.anything()); |
|||
}); |
|||
}); |
|||
|
|||
test('Realm DB inits with existing DB', () => { |
|||
return initDB() |
|||
.then( (dbRef) => { |
|||
expect(dbRef).toEqual(expect.anything()); |
|||
}); |
|||
}); |
|||
|
|||
test('Realm DB returns null after exceptions', () => { |
|||
return initDB('breakDB', 'breakDB') |
|||
.then( (dbRef) => { |
|||
expect(dbRef).toEqual(null); |
|||
}); |
|||
}); |
Loading…
Reference in new issue