Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to a db name instead of just a store name #1184

Merged
merged 4 commits into from Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -38,7 +38,7 @@ class CacheTimestampsModel {
this._cacheName = cacheName;
this._storeName = cacheName;

this._db = new DBWrapper('workbox-cache-expiration', 1, {
this._db = new DBWrapper(this._cacheName, 1, {
onupgradeneeded: (evt) => evt.target.result
.createObjectStore(this._storeName, {keyPath: URL_KEY})
.createIndex(TIMESTAMP_KEY, TIMESTAMP_KEY, {unique: false}),
Expand Down
Expand Up @@ -28,7 +28,7 @@ describe(`[workbox-cache-expiration] CacheTimestampsModel`, function() {
await model.setTimestamp('/', timestamp);

const timestamps =
await new DBWrapper(`workbox-cache-expiration`, 1).getAll('test-cache');
await new DBWrapper('test-cache', 1).getAll('test-cache');

expect(timestamps).to.deep.equal([{
url: 'https://example.com/',
Expand Down