Skip to content

Commit 2d38026

Browse files
Update Jest mock file comments to include @file annotations for clarity
- Added @file annotations to the comments in various Jest mock files to standardize documentation and improve clarity on their purpose. - Updated unit test files to reflect the same @file annotation format for consistency in documentation style. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 658791f commit 2d38026

17 files changed

Lines changed: 56 additions & 55 deletions

__mocks__/fileMock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for static asset imports (images, fonts, etc.). Importing e.g. `logo.png` in tests will
2+
* @file Jest mock for static asset imports (images, fonts, etc.). Importing e.g. `logo.png` in tests will
33
* receive this string instead of running file loaders. Mirrors webpack's asset/inline and
44
* asset/resource handling in webpack.config.base.
55
*

__mocks__/interlinearXmlContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for webpack ?raw XML import. Exports the contents of test-data/Interlinear_en_MAT.xml
2+
* @file Jest mock for webpack ?raw XML import. Exports the contents of test-data/Interlinear_en_MAT.xml
33
* so interlinearizer.web-view.tsx can parse it in unit tests without webpack.
44
*/
55
import fs from 'fs';

__mocks__/papi-backend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for @papi/backend. Provides papi and logger so main.ts can be unit-tested without
2+
* @file Jest mock for @papi/backend. Provides papi and logger so main.ts can be unit-tested without
33
* loading the real Platform API.
44
*/
55

__mocks__/papi-core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for @papi/core. main.ts imports only types from here (ExecutionActivationContext,
2+
* @file Jest mock for @papi/core. main.ts imports only types from here (ExecutionActivationContext,
33
* IWebViewProvider, SavedWebViewDefinition, WebViewDefinition); types are erased at runtime so this
44
* mock only needs to exist for module resolution.
55
*/

__mocks__/papi-frontend-react.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for @papi/frontend/react. Provides stub implementations of various PAPI React hooks so
2+
* @file Jest mock for @papi/frontend/react. Provides stub implementations of various PAPI React hooks so
33
* WebView/frontend components can be unit-tested without the real Platform API.
44
*/
55

__mocks__/papi-frontend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for @papi/frontend. Provides papi, logger, network, projectDataProviders, and other
2+
* @file Jest mock for @papi/frontend. Provides papi, logger, network, projectDataProviders, and other
33
* renderer API stubs so WebView/frontend code can be unit-tested without loading the real
44
* Platform API.
55
*/

__mocks__/platform-bible-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for platform-bible-utils. Exposes only UnsubscriberAsyncList so test-helpers can build
2+
* @file Jest mock for platform-bible-utils. Exposes only UnsubscriberAsyncList so test-helpers can build
33
* ExecutionActivationContext without loading the real package (which pulls in ESM deps).
44
*/
55

__mocks__/styleInlineMock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for webpack ?inline style imports (e.g. .scss?inline). Returns empty string as the
2+
* @file Jest mock for webpack ?inline style imports (e.g. .scss?inline). Returns empty string as the
33
* "inlined" content so main.ts can pass it to the WebView definition.
44
*/
55
module.exports = '';

__mocks__/styleMock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for stylesheet imports (CSS, SCSS, SASS). Used so that `import './foo.scss'` and
2+
* @file Jest mock for stylesheet imports (CSS, SCSS, SASS). Used so that `import './foo.scss'` and
33
* similar do not run real style loaders in tests. Mirrors webpack's handling of .(sa|sc|c)ss in
44
* webpack.config.base (we mock instead of compile).
55
*

__mocks__/web-view-inline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Jest mock for webpack ?inline component import (interlinearizer.web-view?inline). Exports a dummy
2+
* @file Jest mock for webpack ?inline component import (interlinearizer.web-view?inline). Exports a dummy
33
* function so main.ts can pass it to the WebView provider without pulling in React.
44
* Returns null so that if this mock is ever rendered as a React component, it follows React
55
* semantics (null = render nothing; undefined can trigger strict-mode warnings).

0 commit comments

Comments
 (0)