1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// githttp-fs
//
// Git-based Content Management System
// Copyright: 2026, Valerian Saliou <valerian@valeriansaliou.name>
// License: Mozilla Public License v2.0 (MPL v2.0)
//! The test suite.
//!
//! It is split the way the codebase is: modules that are pure functions of
//! their input are tested directly ([`validate`], [`seek`], [`order_index`],
//! [`config`], [`traverse`]), and everything whose contract is an HTTP
//! contract is tested through a real server on a real socket (see
//! [`harness`]).
//! One module tests no code at all: [`opencollection`] checks that the API
//! client collection in `dev/opencollection/` still mirrors the router.
//!
//! The behaviour asserted here is the behaviour documented in `API.md`.
//! Where a test's expectation looks surprising, the documented rule it comes
//! from is quoted in a comment above it — so a future change that breaks a
//! test can be judged against what the API promised, not just against what
//! the code used to do.