-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathofflineShell.test.ts
More file actions
19 lines (17 loc) · 878 Bytes
/
offlineShell.test.ts
File metadata and controls
19 lines (17 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import fs from 'node:fs';
import path from 'node:path';
import { describe, expect, it } from 'vitest';
describe('offline shell', () => {
it('does not depend on external CDN assets in index.html', () => {
const html = fs.readFileSync(path.resolve(__dirname, 'index.html'), 'utf8');
expect(html).not.toContain('https://fonts.googleapis.com');
expect(html).not.toContain('https://fonts.gstatic.com');
expect(html).not.toContain('https://cdn.tailwindcss.com');
expect(html).not.toContain('https://cdnjs.cloudflare.com');
expect(html).not.toContain('https://aistudiocdn.com');
expect(html).not.toContain('href="/manifest.json"');
expect(html).not.toContain('href="/icon.svg"');
expect(html).not.toContain('href="/hljs-light.css"');
expect(html).not.toContain('href="/hljs-dark.css"');
});
});