发布 0.1.0 页面介绍与分享兼容更新
This commit is contained in:
+13
-1
@@ -67,7 +67,7 @@ function decodeRgbaPng(buffer) {
|
||||
return { width, height, pixels }
|
||||
}
|
||||
|
||||
describe('application icon assets', () => {
|
||||
describe('application branding assets', () => {
|
||||
it('keeps the vector favicon self-contained', async () => {
|
||||
const svg = await readFile(path.join(publicRoot, 'favicon.svg'), 'utf8')
|
||||
|
||||
@@ -128,6 +128,7 @@ describe('application icon assets', () => {
|
||||
expect(manifest).toMatchObject({
|
||||
name: 'Web Tools',
|
||||
short_name: 'Web Tools',
|
||||
description: '一个匿名访问、自托管的浏览器本地工具箱',
|
||||
start_url: '/',
|
||||
scope: '/',
|
||||
display: 'standalone',
|
||||
@@ -151,6 +152,17 @@ describe('application icon assets', () => {
|
||||
expect(html).toContain('<link rel="manifest" href="/site.webmanifest" />')
|
||||
})
|
||||
|
||||
it('declares one product description for standard and Open Graph consumers without a custom image', async () => {
|
||||
const html = (await readProjectFile('index.html')).toString('utf8')
|
||||
|
||||
expect(html).toContain('<meta name="description" content="一个匿名访问、自托管的浏览器本地工具箱" />')
|
||||
expect(html).toContain('<meta property="og:description" content="一个匿名访问、自托管的浏览器本地工具箱" />')
|
||||
expect(html.match(/一个匿名访问、自托管的浏览器本地工具箱/g)).toHaveLength(2)
|
||||
expect(html).not.toContain('share-preview.png')
|
||||
expect(html).not.toMatch(/(?:name|property)="(?:og|twitter):[^\"]*image/i)
|
||||
expect(html).not.toMatch(/(?:name|property)="twitter:/i)
|
||||
})
|
||||
|
||||
it('includes public assets in container builds', async () => {
|
||||
expect((await readProjectFile('Dockerfile')).toString('utf8')).toContain('COPY public ./public')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user