Follows-up
45bec76. This caused most localStorage cache entries from
mw.loader.store to be ignored because it'd store tje source code with
a version string that wrongly started with an "@".
As such, on the next page view, when comparing against the version
string from the startup manifest, it would mismatch and eventually
be pruned by mw.loader.store.
Change-Id: If14c80989c0bb28b7b209abe89f83d585c563987
}
return {
name: key.slice( 0, index ),
}
return {
name: key.slice( 0, index ),
- version: key.slice( index )
+ version: key.slice( index + 1 )
return mw.loader.using( 'test.stale' )
.then( function () {
assert.strictEqual( count, 1 );
return mw.loader.using( 'test.stale' )
.then( function () {
assert.strictEqual( count, 1 );
+ // After implementing, registry contains version as implemented by the response.
+ assert.strictEqual( mw.loader.getVersion( 'test.stale' ), 'v1', 'Override version' );
assert.strictEqual( mw.loader.getState( 'test.stale' ), 'ready' );
assert.ok( mw.loader.store.get( 'test.stale' ), 'In store' );
} )
assert.strictEqual( mw.loader.getState( 'test.stale' ), 'ready' );
assert.ok( mw.loader.store.get( 'test.stale' ), 'In store' );
} )