I am trying to implement Surrealdb in ueberdb. When I call the init method in the tests it says after 5 seconds it reads: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
Now I'm wondering why couchdb works fine which is also doing an async initialization.
This is the constructor:
constructor(settings:Settings) {
super();
this.settings = settings;
this.db = new Surreal(this.settings.url);
}
and this is the init method:
async init() {
try {
await this.db!.signin({
user: this.settings.user!,
pass: this.settings.password!,
})
await this.db!.use({db: this.settings.url, ns: this.settings.clientOptions.ns})
await this.db!.create(Database.TABLE)
console.log("Database initialized")
}
catch (e) {
console.log(e)
}
}
I can see Database initialized printed out once. The complete code with the tests can be found here: https://github.com/ether/ueberDB/tree/feature/surrealdb
The mocha tests should be fine as couch db works without a problem. So I guess I am missing a key feature when adding a new database. Maybe someone has an idea which.