22
33const expect = require ( "chai" ) . expect ;
44const autoprefixer = require ( "autoprefixer" ) ;
5- const stylelint = require ( "stylelint" ) ;
6- const stylefmt = require ( "stylefmt" ) ;
75const postcss = require ( "postcss" ) ;
86const syntax = require ( "../" ) ;
97
@@ -54,44 +52,6 @@ describe("html tests", () => {
5452 ] . join ( "\n" ) ) ;
5553 } ) ;
5654 } ) ;
57- it ( "stylelint" , ( ) => {
58- return postcss ( [
59- stylelint ( {
60- config : {
61- rules : {
62- indentation : 2 ,
63- "font-family-no-duplicate-names" : true ,
64- } ,
65- } ,
66- } ) ,
67- ] ) . process ( [
68- "<html>" ,
69- "<head>" ,
70- "<style>" ,
71- "a {" ,
72- "\tdisplay: flex;" ,
73- "}" ,
74- "</style>" ,
75- "</head>" ,
76- "<body>" ,
77- "<div style=\"font-family: serif, serif;\">" ,
78- "</div>" ,
79- "</body>" ,
80- "</html>" ,
81- ] . join ( "\n" ) , {
82- syntax,
83- from : "stylelint.html" ,
84- } ) . then ( result => {
85- const errors = result . messages ;
86- expect ( errors ) . to . have . lengthOf ( 2 ) ;
87- expect ( errors [ 0 ] . rule ) . to . equal ( "indentation" ) ;
88- expect ( errors [ 0 ] . line ) . to . equal ( 5 ) ;
89- expect ( errors [ 0 ] . column ) . to . equal ( 2 ) ;
90- expect ( errors [ 1 ] . rule ) . to . equal ( "font-family-no-duplicate-names" ) ;
91- expect ( errors [ 1 ] . line ) . to . equal ( 10 ) ;
92- expect ( errors [ 1 ] . column ) . to . equal ( 33 ) ;
93- } ) ;
94- } ) ;
9555
9656 it ( "less" , ( ) => {
9757 const less = [
@@ -114,7 +74,6 @@ describe("html tests", () => {
11474 expect ( root . nodes ) . to . have . lengthOf ( 2 ) ;
11575 expect ( root . toString ( ) ) . equal ( less ) ;
11676 } ,
117- stylefmt ,
11877 ] ) . process ( less , {
11978 syntax : syntax ( ) ,
12079 from : "less.html" ,
@@ -173,7 +132,6 @@ describe("html tests", () => {
173132 expect ( root . nodes ) . to . have . lengthOf ( 2 ) ;
174133 expect ( root . toString ( ) ) . equal ( less ) ;
175134 } ,
176- stylefmt ,
177135 ] ) . process ( less , {
178136 syntax : syntax ( ) ,
179137 from : "less.html" ,
0 commit comments