Add a new 'default' provider option so we can force the memory provider
for testing
This commit is contained in:
parent
4de8bc4b81
commit
8325b5a9d7
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -37,7 +37,6 @@ function getUrlParams() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProviderType() {
|
function getProviderType() {
|
||||||
var defaultProvider = 'Memory';
|
|
||||||
var queryString = getUrlParams();
|
var queryString = getUrlParams();
|
||||||
|
|
||||||
// If the environment is node or the query string is empty,
|
// If the environment is node or the query string is empty,
|
||||||
|
@ -46,7 +45,7 @@ function getProviderType() {
|
||||||
return defaultProvider;
|
return defaultProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryString['filer-provider'] || defaultProvider;
|
return queryString['filer-provider'] || 'default';
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup(callback) {
|
function setup(callback) {
|
||||||
|
@ -65,7 +64,9 @@ function setup(callback) {
|
||||||
_provider = new WebSQLTestProvider(name);
|
_provider = new WebSQLTestProvider(name);
|
||||||
break;
|
break;
|
||||||
case 'memory':
|
case 'memory':
|
||||||
/* falls through */
|
_provider = new MemoryTestProvider(name);
|
||||||
|
break;
|
||||||
|
case 'default':
|
||||||
default:
|
default:
|
||||||
var BestProvider = findBestProvider();
|
var BestProvider = findBestProvider();
|
||||||
_provider = new BestProvider(name);
|
_provider = new BestProvider(name);
|
||||||
|
|
Loading…
Reference in New Issue