yandex和google更新

This commit is contained in:
谢宇宁
2026-10-27 21:28:04 +07:00
parent db8d838546
commit 93a64beaa0
5 changed files with 50 additions and 5 deletions
+1 -1
View File
@@ -438,7 +438,7 @@ test('SSR emits configured TDK, site_name, canonical and bounded pagination link
assert.match(head,/<meta name="twitter:card" content="summary_large_image"/);
assert.equal(calls.slice(start).filter(call=>call.path==='/api/app/playlet/home').length,1,'SSR and metadata share one homepage request');
assert.equal(calls.slice(start).filter(call=>call.path==='/api/app/config/info').length,1,'SSR and metadata share one configuration request');
assert.ok(!/googletagmanager|google-analytics|mc\.yandex/.test(head));
if(testEnvironment==='production'){const html=home;assert.ok(html.includes('googletagmanager.com/gtag/js?id=G-7ZYCTGDJ4F'));assert.ok(html.includes('metrika/tag.js?id=113827715'));assert.ok(html.includes('mc.yandex.ru/watch/113827715'));}
for(const agent of ['Mozilla/5.0 Chrome/130','Googlebot','facebookexternalhit']){
for(const [path,page] of [['/shorts/',1],['/shorts/page/2/',2],['/shorts/page/3/',3]]){
const response=await fetch(base+path+'?channel=campaign',{redirect:'manual',headers:{'User-Agent':agent}});