Skip to content

Commit ca8c424

Browse files
committed
test: less and scss files lint integration tests
1 parent b927eb6 commit ca8c424

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

test/spec/Extn-CSSCodeHints-integ-test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,31 @@ define(function (require, exports, module) {
162162
runTests(localTestFile);
163163
});
164164
}
165+
166+
describe("less and scss warnings quick view", function () {
167+
it(`Should allow comments in less`, async function () {
168+
await awaitsForDone(SpecRunnerUtils.openProjectFiles(["less-lint-errors.less"]), "open test file: less-lint-errors.less");
169+
await expectNoCSSLintQuickViewAtPos(46, 8);
170+
});
171+
172+
it(`Should less syntax specific show duplicate properties warning`, async function () {
173+
await awaitsForDone(SpecRunnerUtils.openProjectFiles(["less-lint-errors.less"]), "open test file: less-lint-errors.less");
174+
await checkCSSWarningAtPos("Do not use duplicate style definitions (duplicateProperties)",
175+
49, 14);
176+
await checkCSSWarningAtPos("Do not use duplicate style definitions (duplicateProperties)",
177+
50, 14);
178+
});
179+
180+
it(`Should allow comments in scss`, async function () {
181+
await awaitsForDone(SpecRunnerUtils.openProjectFiles(["less-lint-errors.scss"]), "open test file: less-lint-errors.scss");
182+
await expectNoCSSLintQuickViewAtPos(46, 8);
183+
});
184+
185+
it(`Should allow scss specific syntax`, async function () {
186+
await awaitsForDone(SpecRunnerUtils.openProjectFiles(["less-lint-errors.scss"]), "open test file: less-lint-errors.scss");
187+
await expectNoCSSLintQuickViewAtPos(48, 12);
188+
});
189+
190+
});
165191
});
166192
});

test/spec/LanguageTools-test-files/css-language-service/less-lint-errors.less

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@
4343
.unknown-vendor-prefix-warning {
4444
-microsoft-border-radius: 5px;
4545
}
46+
47+
// single line comments are supported in less
48+
.less {
49+
.nested-style {
50+
display: block;
51+
display: block;
52+
}
53+
}

test/spec/LanguageTools-test-files/css-language-service/less-lint-errors.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@
4343
.unknown-vendor-prefix-warning {
4444
-microsoft-border-radius: 5px;
4545
}
46+
47+
// single line comments are supported in scss
48+
// below to test scss syntax
49+
.#{$fa-css-prefix}-border {
50+
padding: .2em .25em .15em;
51+
border: solid .08em $fa-border-color;
52+
border-radius: .1em;
53+
}

0 commit comments

Comments
 (0)