Load Stats view separately from listening-stat tracking
This commit is contained in:
@@ -68,3 +68,11 @@ test('Share and External stay behind lazy entry proxies',()=>{
|
||||
const text=context.window.YT.External.m3u([{id:'benchmedia01',title:'Fixture'}]);
|
||||
assert.match(text,/#EXTM3U/);assert.match(text,/benchmedia01/);
|
||||
});
|
||||
|
||||
test('listening tracking does not pull in the lazy Stats view',()=>{
|
||||
const {groups}=JSON.parse(readFileSync(join(__dirname,'assets.json'),'utf8'));
|
||||
assert.deepEqual(groups['feature:stats-view'].files,['/stats-view.js']);
|
||||
assert.deepEqual(groups['feature:stats-view'].dependencies,['feature:stats']);
|
||||
assert.deepEqual(groups['feature:stats'].files,['/stats-core.js']);
|
||||
assert.match(app,/Lazy\.proxy\('feature:stats-view', \['render'\], 'StatsView'\)/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user