Skip to content

Commit 7592ab1

Browse files
Ihor MasechkoIhor Masechko
authored andcommitted
Improve docstring coverage for app config
1 parent 34ff9e5 commit 7592ab1

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

website/app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ const apostrophe = require('apostrophe');
22
require('dotenv').config({ path: '../.env' });
33
const { getEnv } = require('./utils/env');
44

5+
/**
6+
* Creates the Apostrophe CMS configuration object.
7+
* Configures session (with optional Redis store), base URL, CORS, and all
8+
* modules (express, template, widgets, pieces, etc.).
9+
*
10+
* @returns {object} Apostrophe configuration with shortName, baseUrl, and modules.
11+
*/
512
function createAposConfig() {
613
const redisUri = process.env.REDIS_URI;
714

website/app.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Tests for website/app.js: createAposConfig and module exports.
3+
*/
14
const { createAposConfig } = require('./app');
25
const mockConnectRedis = jest.fn();
36
jest.mock('connect-redis', () => mockConnectRedis);

0 commit comments

Comments
 (0)