Browse Source

double space lines

pull/1/head
Tim Glasgow 2 years ago
parent
commit
f99c2188a6
  1. 7
      squarenotsquare/__tests__/DB-Setup-test.js
  2. 8
      squarenotsquare/src/realm/dbInit.js

7
squarenotsquare/__tests__/DB-Setup-test.js

@ -0,0 +1,7 @@
import { initDB } from "../src/realm/dbInit";
test('Realm DB inits', async () => {
let realmDB = await initDB();
expect
});

8
squarenotsquare/src/realm/dbInit.js

@ -22,8 +22,6 @@ let systemRepo = null;
let scoreRepo = null; let scoreRepo = null;
let userRepo = null; let userRepo = null;
let realmDB = null;
export async function initDB(){ export async function initDB(){
try { try {
const dbKeyRef = 'squareDB'; const dbKeyRef = 'squareDB';
@ -42,7 +40,7 @@ export async function initDB(){
} }
} }
let dbRef = realmDB; let dbRef = null;
if (dbRef === null){ if (dbRef === null){
let schemaList = [ let schemaList = [
@ -74,9 +72,9 @@ export async function initDB(){
scoreRepo = new ScoreRepo(dbRef) scoreRepo = new ScoreRepo(dbRef)
} }
let realmDB = dbRef; return dbRef;
return realmDB;
} catch (err) { } catch (err) {
console.log(err); console.log(err);
return null;
} }
} }
Loading…
Cancel
Save