Commit Graph

18 Commits

Author SHA1 Message Date
Tony 1410f03e6d test: remove text "Not Found" from httperror
undici (v8.0.2) in node 26.0 enables http2 by default which has empty statusText
refs: 584e6aec01/lib/dispatcher/client-h2.js (L945)
2026-05-06 03:12:57 +08:00
github-actions[bot] ebfe021b50 style: auto format 2026-04-14 15:15:05 +00:00
dependabot[bot] df6b73d866
chore(deps-dev): bump msw from 2.4.3 to 2.12.14 (#21483)
* chore(deps-dev): bump msw from 2.4.3 to 2.12.14

Bumps [msw](https://github.com/mswjs/msw) from 2.4.3 to 2.12.14.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mswjs/msw/compare/v2.4.3...v2.12.14)

---
updated-dependencies:
- dependency-name: msw
  dependency-version: 2.12.14
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: remove supertest

MSW's setupServer() works by patching Node's http module (via @mswjs/interceptors) to intercept outgoing requests. supertest's requests to http://127.0.0.1:1200 go through the same patched http module which causes server bad request

* chore(patch): add patch for @mswjs/interceptors@0.41.3

* fix(server): update server listen options to bypass unhandled requests

* chore: update patch for @mswjs/interceptors

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2026-03-25 02:31:42 +08:00
github-actions[bot] a28890a135 style: auto format 2025-11-27 02:55:46 +00:00
DIYgod 532619a8c2
fix(tests): update expected values and increase timeout for Puppeteer tests
- Adjusted expected values in error handling tests to reflect updated application behavior.
- Increased timeout for Puppeteer tests from 20 seconds to 45 seconds to accommodate longer loading times.
2025-08-22 17:45:39 +08:00
DIYgod f51da43fb7
feat(errors): add CaptchaError handling and related tests
- Introduced a new CaptchaError class to handle captcha-related errors.
- Updated the dynamic route to throw CaptchaError when encountering specific error codes.
- Added tests for CaptchaError to ensure proper error handling in the API.
2025-08-22 15:17:16 +08:00
Tony 9d7e1943f0
test: fix tests (#16697)
* test: fix tests

* revert "fix: fill image from itunes_item_image (#16694)"

This reverts commit 879772a97f.

* fix: fill image from jsonfeed template

* chore: bump msw to 2.4.3
2024-09-11 01:05:37 +08:00
DIYgod d1dd8a53ca
feat: retry requesting control (#15717)
* feat: retry requesting control

* test: fix error handling test
2024-05-26 21:48:29 +08:00
Rongrong a99b35f257
feat(core/utils/wechat-mp): major rewrite (#15276)
* feat(core/utils/wechat-mp): major rewrite

* Support more `item_show_type`: `APP_MSG_PAGE`, `VIDEO_SHARE_PAGE`,
`AUDIO_SHARE_PAGE`, and `IMG_SHARE_PAGE`. Previously only the first one
could be parsed properly. There are still some other known types waiting
for live examples for further adaptation. If this is the case, a
fallback method will try to generate entries using mostly OpenGraph
metadata. Meanwhile, the administrator of self-hosted instances will see
warnings in the log, asking them to report the URL as a new live
example. Still, `VIDEO_SHARE_PAGE` explicitly uses the fallback method
without any warning, as there is no possible approach to generate a
video/iframe URL from page metadata.

* Show audio and videos in `APP_MSG_PAGE`. However, not all videos
can be shown due to the same reason as `VIDEO_SHARE_PAGE`.

* Show the location where the article is sent.

* Some bugs, mostly due to outdated cheerio selector, are fixed.

* Add a new sub-route `wechat-mp` to `/test` to make things easier.

* All changes are well-tested.

Signed-off-by: Rongrong <i@rong.moe>

* style(core/utils/wechat-mp): fix ESLint & CodeQL errors

Signed-off-by: Rongrong <i@rong.moe>

* style(core/utils/wechat-mp): fix a DeepScan issue

Signed-off-by: Rongrong <i@rong.moe>

* style(core/utils/wechat-mp): fix ESLint error

Another try w/ pre-commit hook disabled.

Signed-off-by: Rongrong <i@rong.moe>

---------

Signed-off-by: Rongrong <i@rong.moe>
2024-04-18 22:05:32 +08:00
DIYgod c145a72590
test: add invalid-parameter-error and config-not-found-error 2024-04-07 17:46:46 +08:00
DIYgod 2a6d5ac9f9
feat: better error message 2024-04-07 13:07:09 +08:00
DIYgod f5ced001eb
test: errors 2024-03-31 03:17:53 +08:00
DIYgod 94cf0742af
feat: new error page 2024-03-06 02:33:28 +08:00
Tony 4c4d68e32b
test(error/index): revert accidental changes from #14664 2024-03-05 15:19:43 +08:00
Tony d17ebe81d0
feat(index): add back hot stats (#14664) 2024-03-05 13:55:39 +08:00
DIYgod 38e42156a0
feat: replace jest with vitest 2024-03-03 18:57:07 +08:00
DIYgod 398be0f592
feat: rename routes dir - 1/2 2024-03-01 01:21:28 +08:00
DIYgod b58b6e60cf
test: errors 2024-02-26 18:36:34 +08:00