Tests: internal/docsite
internal/docsite · 21 tests
Each test is named for the property it holds, and runs against a real deployment: there is no mock of the database and no arm that skips when it is absent. The sentence is the test's name read back; the name is what go test -run takes.
code_test.go
- Reading a file keeps its constraint its own comment and every declaration apart —
TestReadingAFileKeepsItsConstraintItsOwnCommentAndEveryDeclarationApart
docsite_test.go
- The site covers every package every migration and every table from this repository —
TestTheSiteCoversEveryPackageEveryMigrationAndEveryTableFromThisRepository - The schema reference describes every table the migrations build —
TestTheSchemaReferenceDescribesEveryTableTheMigrationsBuild - A scratch database is refused without the substrates bootstrap or a usable DSN —
TestAScratchDatabaseIsRefusedWithoutTheSubstratesBootstrapOrAUsableDSN - A build without a database is refused rather than published without its schema —
TestABuildWithoutADatabaseIsRefusedRatherThanPublishedWithoutItsSchema - The build refuses a document directory it would be dangerous to replace —
TestTheBuildRefusesADocumentDirectoryItWouldBeDangerousToReplace - A package with no doc comment is refused —
TestAPackageWithNoDocCommentIsRefused - A link that names nothing is refused —
TestALinkThatNamesNothingIsRefused - A document the navigation does not reach is refused —
TestADocumentTheNavigationDoesNotReachIsRefused - A document kept in the repository is not published and a link to it goes to its source —
TestADocumentKeptInTheRepositoryIsNotPublishedAndALinkToItGoesToItsSource - A kept list that contradicts the navigation or names nothing is refused —
TestAKeptListThatContradictsTheNavigationOrNamesNothingIsRefused - A navigation without the reference marker or without any file is refused —
TestANavigationWithoutTheReferenceMarkerOrWithoutAnyFileIsRefused - An image under the static directory is served from the site root and a missing one is refused —
TestAnImageUnderTheStaticDirectoryIsServedFromTheSiteRootAndAMissingOneIsRefused - The navigation becomes a guide and a reference sidebar —
TestTheNavigationBecomesAGuideAndAReferenceSidebar - A page keeps what it says and loses only its licence comment and git hub alert syntax —
TestAPageKeepsWhatItSaysAndLosesOnlyItsLicenceCommentAndGitHubAlertSyntax - Links resolve to pages packages or source —
TestLinksResolveToPagesPackagesOrSource - A test name reads back as the sentence it was written from —
TestATestNameReadsBackAsTheSentenceItWasWrittenFrom - A migration header renders as prose and its statements skip function bodies —
TestAMigrationHeaderRendersAsProseAndItsStatementsSkipFunctionBodies - A make target is documented by the comment directly above it —
TestAMakeTargetIsDocumentedByTheCommentDirectlyAboveIt - The reference renders doc links and long declarations —
TestTheReferenceRendersDocLinksAndLongDeclarations - Writing the site into an unwritable place is refused —
TestWritingTheSiteIntoAnUnwritablePlaceIsRefused