Skip to content

Commit 76b6337

Browse files
committed
test: minified css files should not be linted
1 parent 198168f commit 76b6337

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,14 @@ define(function (require, exports, module) {
188188
});
189189

190190
});
191+
192+
it(`Should not lint minified css files`, async function () {
193+
await awaitsForDone(SpecRunnerUtils.openProjectFiles(["css-lint-errors.min.css"]), "open test file: css-lint-errors.min.css");
194+
// there is an error at 2,0 - Do not use empty rulesets (emptyRules)
195+
await expectNoCSSLintQuickViewAtPos(2, 0);
196+
await awaitsFor(()=>{
197+
return testWindow.$("#status-inspection").attr("title") === "No linter available for CSS";
198+
}, "CSS linter to not show for minified files");
199+
});
191200
});
192201
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
@import "no-error.css";
2+
3+
.empty-css-error {}
4+
5+
.duplicate-properties-warning {
6+
color: red;
7+
color: blue;
8+
}
9+
10+
.zero-units-warning {
11+
width: 0px;
12+
}
13+
14+
.box-model-no-warning {
15+
width: 300px;
16+
padding: 50px;
17+
border: 5px solid black;
18+
}
19+
20+
.unknown-properties-warning {
21+
doesntExist: 300px;
22+
}
23+
24+
.ie-hack-warning {
25+
color: blue; /* For modern browsers */
26+
_color: red; /* This color is only for IE 6 and below */
27+
}
28+
29+
.property-ignored-due-to-display-warning {
30+
display: inline-block;
31+
float: right;
32+
}
33+
34+
.no-warnings-on-important {
35+
width: 0 !important;
36+
height: 0 !important;
37+
}
38+
39+
@font-face {
40+
font-family: 'needa default font warning';
41+
}
42+
43+
.unknown-vendor-prefix-warning {
44+
-microsoft-border-radius: 5px;
45+
}

0 commit comments

Comments
 (0)