Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
fixed-test.js
package.json
test.js
yarn.lock

README.md

mocha-unhandled-rejections-example

It is passed, but We want to fail it...

async function fail() {
    throw new Error("FAIL!!");
}

it("unhandled rejection", () => {
    fail();
});

Fix the above:

process.on("unhandledRejection", reason => {
    throw reason;
});

async function fail() {
    throw new Error("FAIL!!");
}

it("unhandled rejection, but throw it", () => {
    fail();
});

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

You can’t perform that action at this time.