-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Tests for error cases #16
Comments
Yea, I have yet to stabilize the error system. I didn't spend much time on it yet—but when I do, which is one of the priorities, I'll make sure it's all tested to the best of my abilities. |
Now that you've put quite a bit of work into the error side of things when will you be adding tests for the errors? I'm trying to keep up but it's difficult without anything concrete to test against. I've added a few tests for some of the more obvious error cases. Here's a couple: http://github.com/jamesfoster/dotless/blob/master/src/dotless.Test/Specs/MixinsFixture.cs#L788
I swap out the default stylizer for a simplified one which just outputs the relavant info for testing. http://github.com/jamesfoster/dotless/blob/master/src/dotless.Test/TestStylizer.cs Let me know what you think and I look forward to seeing what you come up with. |
I like the what happens when there is an error in an argument tho? the arguments index is at the call site already.
I'm guessing it would say there's an error on line 2 which was called from line 2? |
yea, there's still some issues. Syntax errors also sometimes show up in the wrong place. I need to really take a day to improve the error messages throughout. |
without following it through completely it looks like you're trying to get this but it seems as tho you're just passing the same context object around so it would output the same file name twice? Surely you would need to not only store the index of the mixin but also the filename? unless i'm missing something? |
There is now the structure for some tests for errors, which I will expand soon.. |
Don't lint source-map since its owned by another project
I'd love to see some tests to ensure the correct error is raised when invalid less is parsed.
The text was updated successfully, but these errors were encountered: