Ejemplo n.º 1
0
        public void ConfigFile()
        {
            string configFile = TestResources.GetAppRootedPath("resources\\jslint.test.conf");

            JsLintConfiguration config = new JsLintConfiguration();

            config.MergeOptions(configFile);

            Assert.AreEqual("maxerr: 50, browser: false, nomen: false, plusplus: false, forin: false, wsh: true, laxbreak: true", config.OptionsToString(), "Got lint options from conf file");

            Assert.AreEqual("jQuery, HTMLElement, $", config.GlobalsToString());
            Assert.AreEqual(config.ExcludeFiles.Count, 2, "Got 2 files");
            Assert.AreEqual("*.min.js", config.ExcludeFiles.ElementAt(0), "First file was right");
        }