aboutsummaryrefslogtreecommitdiff
path: root/website/scripts/docs-versions.test.ts
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-09-01 14:48:45 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-09-01 14:48:45 +0300
commit8a6d697308162874a236c84aac0b0f8c7ac01f83 (patch)
treeed7dc7e8c6f50d66bde721fae78576aede929f66 /website/scripts/docs-versions.test.ts
parentb54a78aa510b87d1e3b56c619b72eaeb59e4a2a1 (diff)
refactor: separate website presentation from runtime
Diffstat (limited to 'website/scripts/docs-versions.test.ts')
-rw-r--r--website/scripts/docs-versions.test.ts33
1 files changed, 0 insertions, 33 deletions
diff --git a/website/scripts/docs-versions.test.ts b/website/scripts/docs-versions.test.ts
deleted file mode 100644
index dc450b37..00000000
--- a/website/scripts/docs-versions.test.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { describe, expect, test } from 'bun:test';
-import { normalizeVersion, sortVersionsNewestFirst } from './docs-versions.mjs';
-
-describe('normalizeVersion', () => {
- test.each([
- ['0.7.5', '0.7.5'],
- ['v0.7.5', '0.7.5'],
- ])('normalizes %s', (input, expected) => {
- expect(normalizeVersion(input)).toBe(expected);
- });
-
- test('rejects non-release refs', () => {
- expect(() => normalizeVersion('preview-123')).toThrow();
- });
-});
-
-describe('sortVersionsNewestFirst', () => {
- test('sorts semantic versions numerically', () => {
- const versions = [
- { version: '0.6.10' },
- { version: '0.7.2' },
- { version: '0.7.10' },
- { version: '0.5.12' },
- ];
-
- expect(sortVersionsNewestFirst(versions).map(({ version }) => version)).toEqual([
- '0.7.10',
- '0.7.2',
- '0.6.10',
- '0.5.12',
- ]);
- });
-});