Keep single-tag rollback on the legacy worker path
This commit is contained in:
@@ -68,3 +68,7 @@ test('sync rollback changes build identity and injected worker byte hash', () =>
|
||||
expect(on.manifest.buildTag).not.toBe(off.manifest.buildTag);
|
||||
expect(off.manifest.files['/sw.js'].h).toBe(hash(off.sw));
|
||||
}));
|
||||
test('single-tag hashing rollback also selects the legacy worker', () => fixture(dir => {
|
||||
writeFileSync(join(dir,'sw.js'), "const VERSION = typeof __BUILD_TAG__ !== 'undefined' ? __BUILD_TAG__ : 'old'; const SYNC = typeof __ASSET_SYNC__ !== 'undefined' ? __ASSET_SYNC__ : true;");
|
||||
expect(createAssetManifest(dir,{hashing:false}).sw).toContain('const SYNC = false');
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user