I have tried various wrapping with $q in the service, and then calling $rootScope.$digest() in the test but nothing I try works.
Has anyone got a working example of this.
Many Thanks
Without wrapping with $q, you can force the test to wait until the promises have completed, by using the Jasmine's async test pattern. E.g.:
it("can have table names with special characters", function (done) {
db.version(1).stores({
"SpecialRecord:Suffix": "id++,name"
});
db.open()
.then(function (v) {
console.info("Done!");
done();
})
.catch(function (err) {
throw Error(err.toString());
});
});