-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Eyeglass and Async Tests #36
Conversation
Refactor to enable async tests and eyeglass functionality.
This all looks good to me, except for the function name I think |
yah I already went through a few refactors on that one, just couldn't find a good fit. runAssertions sounds great to me! |
Actually I'm having trouble getting this to work with the example code using the before function to wait for the sass render. It seems unless there is a describe and it function call in the same file, the before function will never be called: before(function(done){
// this will not run unless there is a describe it block in this same file
sass.render(eyeglass.sassOptions(), function(err, result) {
if (err) {
throw err;
} else {
sassTrue.runAssertions(result.css, describe, it);
done();
}
});
}); My experience with mocha async stuff is quite limited so looking if anyone has any ideas? |
Solved it using mocha --delay. |
actually I think it's a bug with node-sass |
@DominicBarnard do you recall how you achieved this? Were your modifications necessary to get things working with sass-true? I may be running into this same bug |
A suggestion for a simple and flexible way to address asynchronous tests and eyeglass functionality by allowing modules to render the test sass themselves and have true parse and print the results.