Exemplo n.º 1
0
        public void GetModuleNameFromFileNameWithNothing()
        {
            var fileName = @"jquery.js";
            var expectedModuleName = @"jquery";

            var amdModule = new AmdModule(new RetryableFileOpener());
            var moduleName = amdModule.GetModuleName(fileName);

            Assert.AreEqual(expectedModuleName, moduleName);
        }
Exemplo n.º 2
0
        public void GetModuleNameFromFileNameWithMinAndVersion()
        {
            var fileName = @"jquery-ui.min-1.11.1.js";
            var expectedModuleName = @"jquery-ui";

            var amdModule = new AmdModule(new RetryableFileOpener());
            var moduleName = amdModule.GetModuleName(fileName);

            Assert.AreEqual(expectedModuleName, moduleName);
        }
Exemplo n.º 3
0
        public void GetModuleNameFromFileNameWithVersionMinAndDebug()
        {
            var fileName = @"jquery-2.1.1.min.debug.js";
            var expectedModuleName = @"jquery";

            var amdModule = new AmdModule(new RetryableFileOpener());
            var moduleName = amdModule.GetModuleName(fileName);

            Assert.AreEqual(expectedModuleName, moduleName);
        }