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

Added Asynchronous Lifecycle hooks #6

Merged
merged 2 commits into from
Aug 30, 2016
Merged

Conversation

Haringat
Copy link
Contributor

should solve #5 and also adds the ability to return promises in hooks on which mocha will wait for either their resolve or reject and will fail if it is rejected. Also (of course) adapted test.ts to reflect the changes made to the source.

And added typings because... it kinda made sense and I couldn't find find a @types-npm-package for symbol-shim (would have been dev-dependency).

Sorry for my (perhaps?) bad english. Greetings from germany.

@@ -8,7 +28,8 @@ let beforeEach = global.beforeEach;
let afterAll = global.after;
let afterEach = global.afterEach;

let nodeSymbol = global.Symbol || (key => "__mts_" + key);
//let nodeSymbol = global.Symbol || (key => "__mts_" + key);
let nodeSymbol = (key => "__mts_" + key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really liked the way it worked with symbols, but since symbol seem to cause problems on some node versions, perhaps it really is best to drop the idea.

@PanayotCankov
Copy link
Contributor

This looks great, I will publish a new version at NPM right away.

@PanayotCankov PanayotCankov merged commit 0548f1b into testdeck:master Aug 30, 2016
@PanayotCankov
Copy link
Contributor

Danke schön!

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.

2 participants