New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test refactor #3293

Merged
merged 6 commits into from Oct 18, 2018

Conversation

4 participants
@segayuu
Contributor

segayuu commented Oct 16, 2018

Thank you for creating a pull request to contribute to Hexo code! Before you open the request please review the following guidelines and tips to help it be more easily integrated:

  • Add test cases for the changes.
  • Passed the CI test.

@segayuu segayuu requested a review from hexojs/core Oct 16, 2018

@tcrowe

This comment has been minimized.

Contributor

tcrowe commented Oct 16, 2018

Hi @segayuu

I have something which may help with this:

./test/mocha.opts

--colors
--reporter spec
--bail
--ui bdd
--full-trace
--require chai/register-should
--exit

The key is --require chai/register-should which will allow us not to have to require("chai").should() in every module.

Please consider doing a global replace with "":

  • require('chai').should();
  • const should = require('chai').should();

This branch and description could be changed to test-refactor.

Do you think this recommendation will be helpful?

@coveralls

This comment has been minimized.

coveralls commented Oct 16, 2018

Coverage Status

Coverage remained the same at 97.27% when pulling 9f52ef1 on segayuu:fix-ignore-lint-error into d558ac0 on hexojs:master.

@segayuu segayuu changed the title from Fix ignore lint error to Refactor Test Oct 17, 2018

@segayuu segayuu changed the title from Refactor Test to Test refactor Oct 17, 2018

@segayuu

This comment has been minimized.

Contributor

segayuu commented Oct 17, 2018

thank @tcrowe !
Unfortunately, we can not change the name of the branch on github with the Pull Request open.
To change the name of a branch on github, you need to delete the branch once and recreate it, but in that case the difference will be lost, so the PR will close automatically.

Then, it reflects most of your opinion. Thank you very much.

@tcrowe

This comment has been minimized.

Contributor

tcrowe commented Oct 17, 2018

No problem. Did you like this idea?

@segayuu

This comment has been minimized.

Contributor

segayuu commented Oct 17, 2018

Yes, your advice made a lot of test files simple! Thank you very much.
register-should is magic, but it is quite useful when there are many test files!

@JLHwung

Look good to me.

@segayuu segayuu merged commit 06745ec into hexojs:master Oct 18, 2018

4 checks passed

codeclimate All good!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 97.27%
Details

@segayuu segayuu deleted the segayuu:fix-ignore-lint-error branch Oct 18, 2018

@segayuu

This comment has been minimized.

Contributor

segayuu commented Oct 19, 2018

thank @JLHwung and @tcrowe !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment