• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hexojs / hexo-generator-feed / 286
99%

Build:
DEFAULT BRANCH: master
Ran 01 Jun 2020 03:02AM UTC
Jobs 4
Files 2
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
286

push

travis-ci-com

web-flow
feat: render absolute feed URLs (#143)

This PR is an update to #29.

This supposed to be a small PR, but I've encountered some issues regarding the base URL.

The `[full_url_for](https://github.com/hexojs/hexo-util/blob/master/lib/full_url_for.js#L27)` function expects the `config.url` not to end with a forward slash. Otherwise it will create a double slash URL, e.g. `http://example.com//atom.xml` (notice that a double slash replacement happens only _after_ the base URL).

I was wondering how the icon feature (#102) can be using `full_url_for` with the current code and not run into any double slash issues. The answer is: it doesn't handle this case. The [unit tests](https://github.com/hexojs/hexo-generator-feed/pull/102/files#diff-910eb6f57886ca16c136101fb1699231R240) are simply running against a custom base URL without an ending slash.

I've cleaned up the tests:
- removed the ending slash from the base URL
- adjusted and added new tests to handle subdirectories correctly (as specified in the [hexo documentation](https://hexo.io/docs/configuration.html#URL))
- hard-coded expected values - it makes a test more reliable and readable

20 of 22 branches covered (90.91%)

1 of 1 new or added line in 1 file covered. (100.0%)

44 of 44 relevant lines covered (100.0%)

80.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 286.1 01 Jun 2020 03:02AM UTC 0
100.0
Travis Job 286.1
2 286.2 01 Jun 2020 03:02AM UTC 0
100.0
Travis Job 286.2
3 286.3 01 Jun 2020 03:02AM UTC 0
100.0
Travis Job 286.3
4 286.4 01 Jun 2020 03:02AM UTC 0
100.0
Travis Job 286.4
Source Files on build 286
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #286
  • c164383b on github
  • Prev Build on master (#281)
  • Next Build on master (#295)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc