mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
move docs back repo
This commit is contained in:
37
docs-site/docs-sync.test.ts
Normal file
37
docs-site/docs-sync.test.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { expect, test } from 'bun:test';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
const readmeContents = readFileSync(new URL('./README.md', import.meta.url), 'utf8');
|
||||
const usageContents = readFileSync(new URL('./usage.md', import.meta.url), 'utf8');
|
||||
const installationContents = readFileSync(new URL('./installation.md', import.meta.url), 'utf8');
|
||||
const mpvPluginContents = readFileSync(new URL('./mpv-plugin.md', import.meta.url), 'utf8');
|
||||
const developmentContents = readFileSync(new URL('./development.md', import.meta.url), 'utf8');
|
||||
const changelogContents = readFileSync(new URL('./changelog.md', import.meta.url), 'utf8');
|
||||
const ankiIntegrationContents = readFileSync(new URL('./anki-integration.md', import.meta.url), 'utf8');
|
||||
const configurationContents = readFileSync(new URL('./configuration.md', import.meta.url), 'utf8');
|
||||
|
||||
test('docs reflect current launcher and release surfaces', () => {
|
||||
expect(usageContents).not.toContain('--mode preprocess');
|
||||
expect(usageContents).not.toContain('"automatic" (default)');
|
||||
expect(usageContents).toContain('before mpv starts');
|
||||
|
||||
expect(installationContents).toContain('bun run build:appimage');
|
||||
expect(installationContents).toContain('bun run build:win');
|
||||
|
||||
expect(mpvPluginContents).toContain('\\\\.\\pipe\\subminer-socket');
|
||||
|
||||
expect(readmeContents).toContain('Root directory: `docs-site`');
|
||||
expect(readmeContents).toContain('Build output directory: `.vitepress/dist`');
|
||||
expect(developmentContents).not.toContain('../subminer-docs');
|
||||
expect(developmentContents).toContain('bun run docs:build');
|
||||
expect(developmentContents).toContain('bun run docs:test');
|
||||
expect(developmentContents).not.toContain('test:subtitle:dist');
|
||||
expect(developmentContents).toContain('bun run build:win');
|
||||
|
||||
expect(ankiIntegrationContents).not.toContain('alwaysUseAiTranslation');
|
||||
expect(ankiIntegrationContents).not.toContain('targetLanguage');
|
||||
expect(configurationContents).not.toContain('youtubeSubgen": {\n "mode"');
|
||||
expect(configurationContents).toContain('### Shared AI Provider');
|
||||
|
||||
expect(changelogContents).toContain('## v0.5.1 (2026-03-09)');
|
||||
});
|
||||
Reference in New Issue
Block a user