Skip to content

Commit

Permalink
feat: longer default titleLengthLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Mar 17, 2020
1 parent 433c866 commit aea67f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const calculateValue = () => {
requestRetry: parseInt(envs.REQUEST_RETRY) || 2, // 请求失败重试次数
// 是否显示 Debug 信息,取值 boolean 'false' 'key' ,取值为 'false' false 时永远不显示,取值为 'key' 时带上 ?debug=key 显示
debugInfo: envs.DEBUG_INFO || true,
titleLengthLimit: parseInt(envs.TITLE_LENGTH_LIMIT) || 100,
titleLengthLimit: parseInt(envs.TITLE_LENGTH_LIMIT) || 150,
redis: {
url: envs.REDIS_URL || 'redis://localhost:6379/',
options: {
Expand Down
2 changes: 1 addition & 1 deletion test/middleware/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('template', () => {
it(`long title`, async () => {
const response = await request.get('/test/long');
const parsed = await parser.parseString(response.text);
expect(parsed.items[0].title.length).toBe(103);
expect(parsed.items[0].title.length).toBe(153);
});

it(`enclosure`, async () => {
Expand Down

0 comments on commit aea67f7

Please sign in to comment.