-
Notifications
You must be signed in to change notification settings - Fork 532
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
Sass Syntax - Tests progress #166
Comments
Awesome, I started having a look at this after we spoke this morning, but looks like you've got further ahead than me. Do you wanna explain a little how you're going about it, I've got a few rules nearly done here that i'd like to get the sass tests up and running for too, be good to have them in the same format as yours. |
Sure, it's very simple and happy to alter if you've got a better suggestion. All I'm doing is creating .sass versions of the .scss files (with any adjustments if required) and updating the mocha test file to test for both. Ideally we should be writing the actual rules in a way that's syntax agnostic so in my mind we shouldn't have two separate tests but simply improve the current one's to take into account any issues (currently not too many). Example below; 'use strict';
var lint = require('./_lint');
describe('no extends - scss', function () {
var file = lint.file('no-extends.scss');
it('scss - enforce', function (done) {
lint.test(file, {
'no-extends': 1
}, function (data) {
lint.assert.equal(1, data.warningCount);
done();
});
});
});
describe('no extends - sass', function () {
var file = lint.file('no-extends.sass');
it('sass - enforce', function (done) {
lint.test(file, {
'no-extends': 1
}, function (data) {
lint.assert.equal(1, data.warningCount);
done();
});
});
}); The only issue I've found with this method is that you have declare file within the assertion and so there's some duplication of that when you have lots of assertions. Thoughts? |
This will be ok to start with but I think the duplication will become a little unmanageable for the rules where there are lots of test cases. The tests should give the same results for both scss and sass, but I guess seen as some of the rules won't apply to the sass side of things it adds a small challenge there, for now something as simple as setting the i.e. one loop for the whole test sweet that just runs each tests against each syntax |
Followed your lead I believe for this new rule, we can revisit once everything is up and running again? |
You should look to get this up as a PR soon preferably before you go any further, we can then keep track a bit better of what still needs to be done and any issues we find in separate issues. Also it'll give us a nice base from which to get sass tests as the norm for any further rules being written. |
Going to wait for the latest version of |
Indentation is now good. |
Having had a few Sass Syntax related issues popping up, I think it would be a good move to create tests for that syntax too.
I've started going through the current tests and have created quite a few .sass equivalents. So far there has been a few tests that have failed but the majority are ok.
By testing both the SCSS and Sass syntax I feel we will then be able to confidently say that we have cross syntax support.
I'll update the list below as I go.
The rules
Rules that are N/A
The text was updated successfully, but these errors were encountered: