content-client.test.cjs
Source file: tests/contracts/content-client.test.cjs
Module: tests-contracts
Size: 65 lines
SHA-256: 84cd8b54deb431d66d39336a6ebc7f3017170347c17e05a9fe02c366f8938f3f
Responsibility
Checks service and UI contract invariants.
Declared entry points
test— source line 3.assert— source line 4.fs— source line 5.path— source line 6.Module— source line 7.ts— source line 8.source— source line 9.code— source line 10.compiled— source line 13.config— source line 15.row— source line 16.reply— source line 17.client— source line 20.page— source line 21.client— source line 29.client— source line 36.client— source line 40.client— source line 44.client— source line 48.controller— source line 52.client— source line 53.client— source line 59.client— source line 63.
Imports and dependencies
- Line 3:
const test = require('node:test'); - Line 4:
const assert = require('node:assert/strict'); - Line 5:
const fs = require('node:fs'); - Line 6:
const path = require('node:path'); - Line 7:
const Module = require('node:module'); - Line 8:
const ts = require('typescript');
Behaviour and audit locations
- Line 25:
assert.equal(requested.options.credentials,'omit'); - Line 33:
test('rejects credentials in a publishing URL',()=>assert.throws(()=>new WordPressContentClient({...config,restBaseUrl:'https://user:secret@cms.example/wp-json/wp/v2/'}))
Relationship to the system
This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.
Change verification
Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.