Пример #1
0
        public void CanBundleJavaScriptWithDeferredLoad()
        {
            var tag = javaScriptBundle
                      .WithDeferredLoad()
                      .Add("~/js/test.js")
                      .Render("~/js/output_1.js");

            Assert.AreEqual("<script type=\"text/javascript\" src=\"js/output_1.js?r=36286D0CEA57C5ED24B868EB0D2898E9\" defer></script>", tag);
            Assert.AreEqual(minifiedJavaScript, fileWriterFactory.Files[TestUtilities.PrepareRelativePath(@"js\output_1.js")]);
        }