public void CompileBabel() { var result = _processor.Process("../../artifacts/babelconfig.json"); Assert.IsTrue(File.Exists("../../artifacts/babel/file1.js")); string sourceMap = ScssTest.DecodeSourceMap(result.First().CompiledContent); Assert.IsTrue(sourceMap.Contains("/file1.jsx\""), "Source map paths"); }
public void CompileStylus() { var result = _processor.Process("../../artifacts/stylusconfig.json"); Assert.IsTrue(File.Exists("../../artifacts/stylus/output.css"), "output doesn't exist"); string sourceMap = ScssTest.DecodeSourceMap(result.First().CompiledContent); Assert.IsTrue(sourceMap.Contains("\"vendor.styl\""), "Source map paths"); }
public void CompileLess() { var result = _processor.Process("../../artifacts/lessconfig.json"); Assert.IsTrue(File.Exists("../../artifacts/less/test.css")); Assert.IsTrue(File.Exists("../../artifacts/less/test.min.css")); Assert.IsTrue(result.ElementAt(1).CompiledContent.Contains("url(foo.png)")); Assert.IsTrue(result.ElementAt(1).CompiledContent.Contains("-webkit-animation"), "AutoPrefix"); Assert.IsTrue(File.ReadAllText("../../artifacts/less/test.min.css").Contains("important comment"), "Default options"); string sourceMap = ScssTest.DecodeSourceMap(result.ElementAt(1).CompiledContent); Assert.IsTrue(sourceMap.Contains("\"relative.less\""), "Source map paths"); }
public void CompileLess() { var result = _processor.Process("../../artifacts/lessconfig.json"); Assert.IsTrue(result.All(r => !r.HasErrors)); Assert.IsTrue(File.Exists("../../artifacts/less/test.css")); Assert.IsTrue(File.Exists("../../artifacts/less/test.min.css")); Assert.IsTrue(result.ElementAt(1).CompiledContent.Contains("url(foo.png)")); Assert.IsTrue(result.ElementAt(1).CompiledContent.Contains("-webkit-animation"), "AutoPrefix"); Assert.IsTrue(File.ReadAllText("../../artifacts/less/test.min.css").Contains("important comment"), "Default options"); string sourceMap = ScssTest.DecodeSourceMap(result.ElementAt(1).CompiledContent); Assert.IsTrue(sourceMap.Contains("\"relative.less\""), "Source map paths"); string compiled = result.First().CompiledContent; int top = compiled.IndexOf("top"); int pos = compiled.IndexOf("position"); Assert.IsTrue(pos < top, "CSS Comb ordering"); }