Skip to content
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

Release: v3.0.0 #2350

Closed
wants to merge 70 commits into from
Closed

Release: v3.0.0 #2350

wants to merge 70 commits into from

Conversation

boneskull
Copy link
Contributor

@boneskull boneskull commented Jul 3, 2016

OK, so this PR represents v3.0.0, which contains breaking changes. Notably, Node.js v0.8 support is dropped.

This PR will probably undergo some rebasing before it's merged.

TODO:

  1. AppVeyor must pass
  2. Update contributors field of package.json
  3. Update CHANGELOG
  4. Update relevant site documentation

Once 1. is working, I'll publish this branch as a pre-release version.

A rough estimation of notable changes:

  • Add IE7 support

  • Mocha will throw an exception if done is passed to a test and a Promise is returned:

    it('should now throw an exception', function (done) {
      return new Promise(function (resolve) {
        resolve();
      })
        .then(done);
    });
  • glob is updated to latest version; a production npm install of mocha should not fail an nsp check (DoS vulnerability in glob dependency #2318)

  • jade is upgraded to latest pug (as of last night) (Change jade dependency to pug after their renaming #2200)

  • it.only() and describe.only() no longer leverage "grep" to do their work; these functions should now work like you think they should (describe.only matches more that one describe test suite #1481)

  • Altered dot reporter output to be more visually distinctive.

  • Mocha will now throw an error if a suite or test is untitled:

    // this will now fail
    it(function () {
      assert(true);
    });
  • The minimum version of Node.js required is now v0.10.x.

  • The minimum version of npm required is now v1.4.x.

ndhoule and others added 30 commits July 1, 2016 22:17
https://travis-ci.org/mochajs/mocha/jobs/38422941

The only problem in this error is that npm v1.2 doesn’t support `^`
version specifier. It's not the problem of Node v0.8 itself.

So I updated the installation command to install the latest version of
npm, before installing the dependencies of mocha.
Users may register `Runnable`s as asynchronous in one of two ways:

- Via callback (by defining the body function to have an arity of one)
- Via promise (by returning a Promise object from the body function)

When both a callback function is specified *and* a Promise object is
returned, the `Runnable`'s resolution condition is ambiguous.
Practically speaking, users are most likely to make this mistake as they
transition between asynchronous styles.

Currently, Mocha silently prefers the callback amd ignores the Promise
object. Update the implementation of the `Runnable` class to fail
immediately when the test resolution method is over-specified in this
way.
Add the ability to pass grep as a regexp-like string. (query in the
browser or flag in the cli).
This improvement gives you pass a regexp that including a flag, and
solved #808 as well.
Throw a user-friendly error when the suite title or the test-case title
isn't provided.
This PR fix #1481, and also extends the .only() behaviour.
(i.e: it's not use grep anymore, support suite, test-case or both, add
the ability to run multiple .only)
@boneskull
Copy link
Contributor Author

I've updated the docs and will likely publish Thursday (7/28), barring any unexpected issues or concerns.

I'm still somewhat concerned about the .only() behavior. If someone feels like testing it manually further, that'd be cool.

@mikermcneil
Copy link

@boneskull thanks for the update! I switched over a couple of our modules yesterday and haven't noticed any problems yet, so that's good :) Although, a grain of salt: I haven't used only() in quite a while (been using --grep and .skip() instead)

@boneskull
Copy link
Contributor Author

rebase and merged

@boneskull boneskull closed this Aug 1, 2016
@hairyhenderson
Copy link

Thanks @boneskull, this is awesome! 🎉

@dasilvacontin
Copy link
Contributor

w00t

On 01 Aug 2016, at 05:48, Christopher Hiller notifications@github.com wrote:

Closed #2350.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

ncoden added a commit to ncoden/foundation-sites that referenced this pull request Dec 6, 2016
Update mocha from `^2.3.3` (currently `v2.5.3`) to `v3.2.0`.
No relevant package changes. Essentially bug fixes.

See:
- mochajs/mocha#2350 (`v3.0.0-0` release)
- https://github.com/mochajs/mocha/releases/tag/v3.2.0 (latest release)
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Dec 6, 2016
Update mocha from `^2.3.3` (currently `v2.5.3`) to `v3.2.0`.
No relevant package changes. Essentially bug fixes.

See:
- mochajs/mocha#2350 (`v3.0.0-0` release)
- https://github.com/mochajs/mocha/releases/tag/v3.2.0 (latest release)
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Dec 7, 2016
Update `mocha` from `^2.3.3` (currently `v2.5.3`) to `^3.2.0`.
No relevant package changes. Essentially bug fixes.

See:
- mochajs/mocha#2350 (`v3.0.0-0` release)
- https://github.com/mochajs/mocha/releases/tag/v3.2.0 (latest release)
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Dec 7, 2016
Update `mocha` from `^2.3.3` (currently `v2.5.3`) to `^3.2.0`.
No relevant package changes. Essentially bug fixes.

See:
- mochajs/mocha#2350 (`v3.0.0-0` release)
- https://github.com/mochajs/mocha/releases/tag/v3.2.0 (latest release)
@drazisil drazisil deleted the v3.0.0 branch April 3, 2017 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.