How to use isTrue method in Playwright Internal

Best JavaScript code snippet using playwright-internal

loader.js

Source:loader.js Github

copy

Full Screen

...45 allowRollup: false46 });47 loader.calculate();48 //Testing A normal module49 Assert.isTrue((loader.sorted.indexOf("align-plugin")) > -1, "Module (align-plugin) not found in sorted array");50 },51 "Testing anim": function(data) {52 var loader = new Y.Loader({53 require: ["anim"],54 ignoreRegistered: true,55 allowRollup: false56 });57 loader.calculate();58 //Testing A rollup module59 Assert.isTrue((loader.sorted.indexOf("anim-base")) > -1, "Module (anim-base) not found in sorted array");60 Assert.isTrue((loader.sorted.indexOf("anim-color")) > -1, "Module (anim-color) not found in sorted array");61 Assert.isTrue((loader.sorted.indexOf("anim-curve")) > -1, "Module (anim-curve) not found in sorted array");62 Assert.isTrue((loader.sorted.indexOf("anim-easing")) > -1, "Module (anim-easing) not found in sorted array");63 Assert.isTrue((loader.sorted.indexOf("anim-node-plugin")) > -1, "Module (anim-node-plugin) not found in sorted array");64 Assert.isTrue((loader.sorted.indexOf("anim-scroll")) > -1, "Module (anim-scroll) not found in sorted array");65 Assert.isTrue((loader.sorted.indexOf("anim-xy")) > -1, "Module (anim-xy) not found in sorted array");66 },67 "Testing anim-base": function(data) {68 var loader = new Y.Loader({69 require: ["anim-base"],70 ignoreRegistered: true,71 allowRollup: false72 });73 loader.calculate();74 //Testing A normal module75 Assert.isTrue((loader.sorted.indexOf("anim-base")) > -1, "Module (anim-base) not found in sorted array");76 },77 "Testing anim-color": function(data) {78 var loader = new Y.Loader({79 require: ["anim-color"],80 ignoreRegistered: true,81 allowRollup: false82 });83 loader.calculate();84 //Testing A normal module85 Assert.isTrue((loader.sorted.indexOf("anim-color")) > -1, "Module (anim-color) not found in sorted array");86 },87 "Testing anim-curve": function(data) {88 var loader = new Y.Loader({89 require: ["anim-curve"],90 ignoreRegistered: true,91 allowRollup: false92 });93 loader.calculate();94 //Testing A normal module95 Assert.isTrue((loader.sorted.indexOf("anim-curve")) > -1, "Module (anim-curve) not found in sorted array");96 },97 "Testing anim-easing": function(data) {98 var loader = new Y.Loader({99 require: ["anim-easing"],100 ignoreRegistered: true,101 allowRollup: false102 });103 loader.calculate();104 //Testing A normal module105 Assert.isTrue((loader.sorted.indexOf("anim-easing")) > -1, "Module (anim-easing) not found in sorted array");106 },107 "Testing anim-node-plugin": function(data) {108 var loader = new Y.Loader({109 require: ["anim-node-plugin"],110 ignoreRegistered: true,111 allowRollup: false112 });113 loader.calculate();114 //Testing A normal module115 Assert.isTrue((loader.sorted.indexOf("anim-node-plugin")) > -1, "Module (anim-node-plugin) not found in sorted array");116 },117 "Testing anim-scroll": function(data) {118 var loader = new Y.Loader({119 require: ["anim-scroll"],120 ignoreRegistered: true,121 allowRollup: false122 });123 loader.calculate();124 //Testing A normal module125 Assert.isTrue((loader.sorted.indexOf("anim-scroll")) > -1, "Module (anim-scroll) not found in sorted array");126 },127 "Testing anim-shape": function(data) {128 var loader = new Y.Loader({129 require: ["anim-shape"],130 ignoreRegistered: true,131 allowRollup: false132 });133 loader.calculate();134 //Testing A normal module135 Assert.isTrue((loader.sorted.indexOf("anim-shape")) > -1, "Module (anim-shape) not found in sorted array");136 },137 "Testing anim-shape-transform": function(data) {138 var loader = new Y.Loader({139 require: ["anim-shape-transform"],140 ignoreRegistered: true,141 allowRollup: false142 });143 loader.calculate();144 //Testing A rollup module145 Assert.isTrue((loader.sorted.indexOf("anim-shape")) > -1, "Module (anim-shape) not found in sorted array");146 },147 "Testing anim-xy": function(data) {148 var loader = new Y.Loader({149 require: ["anim-xy"],150 ignoreRegistered: true,151 allowRollup: false152 });153 loader.calculate();154 //Testing A normal module155 Assert.isTrue((loader.sorted.indexOf("anim-xy")) > -1, "Module (anim-xy) not found in sorted array");156 },157 "Testing app": function(data) {158 var loader = new Y.Loader({159 require: ["app"],160 ignoreRegistered: true,161 allowRollup: false162 });163 loader.calculate();164 //Testing A rollup module165 Assert.isTrue((loader.sorted.indexOf("app-base")) > -1, "Module (app-base) not found in sorted array");166 Assert.isTrue((loader.sorted.indexOf("app-content")) > -1, "Module (app-content) not found in sorted array");167 Assert.isTrue((loader.sorted.indexOf("app-transitions")) > -1, "Module (app-transitions) not found in sorted array");168 Assert.isTrue((loader.sorted.indexOf("lazy-model-list")) > -1, "Module (lazy-model-list) not found in sorted array");169 Assert.isTrue((loader.sorted.indexOf("model")) > -1, "Module (model) not found in sorted array");170 Assert.isTrue((loader.sorted.indexOf("model-list")) > -1, "Module (model-list) not found in sorted array");171 Assert.isTrue((loader.sorted.indexOf("model-sync-rest")) > -1, "Module (model-sync-rest) not found in sorted array");172 Assert.isTrue((loader.sorted.indexOf("router")) > -1, "Module (router) not found in sorted array");173 Assert.isTrue((loader.sorted.indexOf("view")) > -1, "Module (view) not found in sorted array");174 Assert.isTrue((loader.sorted.indexOf("view-node-map")) > -1, "Module (view-node-map) not found in sorted array");175 },176 "Testing app-base": function(data) {177 var loader = new Y.Loader({178 require: ["app-base"],179 ignoreRegistered: true,180 allowRollup: false181 });182 loader.calculate();183 //Testing A normal module184 Assert.isTrue((loader.sorted.indexOf("app-base")) > -1, "Module (app-base) not found in sorted array");185 },186 "Testing app-content": function(data) {187 var loader = new Y.Loader({188 require: ["app-content"],189 ignoreRegistered: true,190 allowRollup: false191 });192 loader.calculate();193 //Testing A normal module194 Assert.isTrue((loader.sorted.indexOf("app-content")) > -1, "Module (app-content) not found in sorted array");195 },196 "Testing app-transitions": function(data) {197 var loader = new Y.Loader({198 require: ["app-transitions"],199 ignoreRegistered: true,200 allowRollup: false201 });202 loader.calculate();203 //Testing A normal module204 Assert.isTrue((loader.sorted.indexOf("app-transitions")) > -1, "Module (app-transitions) not found in sorted array");205 },206 "Testing app-transitions-native": function(data) {207 var loader = new Y.Loader({208 require: ["app-transitions-native"],209 ignoreRegistered: true,210 allowRollup: false211 });212 loader.calculate();213 //Testing A normal module214 Assert.isTrue((loader.sorted.indexOf("app-transitions-native")) > -1, "Module (app-transitions-native) not found in sorted array");215 },216 "Testing array-extras": function(data) {217 var loader = new Y.Loader({218 require: ["array-extras"],219 ignoreRegistered: true,220 allowRollup: false221 });222 loader.calculate();223 //Testing A normal module224 Assert.isTrue((loader.sorted.indexOf("array-extras")) > -1, "Module (array-extras) not found in sorted array");225 },226 "Testing array-invoke": function(data) {227 var loader = new Y.Loader({228 require: ["array-invoke"],229 ignoreRegistered: true,230 allowRollup: false231 });232 loader.calculate();233 //Testing A normal module234 Assert.isTrue((loader.sorted.indexOf("array-invoke")) > -1, "Module (array-invoke) not found in sorted array");235 },236 "Testing arraylist": function(data) {237 var loader = new Y.Loader({238 require: ["arraylist"],239 ignoreRegistered: true,240 allowRollup: false241 });242 loader.calculate();243 //Testing A normal module244 Assert.isTrue((loader.sorted.indexOf("arraylist")) > -1, "Module (arraylist) not found in sorted array");245 },246 "Testing arraylist-add": function(data) {247 var loader = new Y.Loader({248 require: ["arraylist-add"],249 ignoreRegistered: true,250 allowRollup: false251 });252 loader.calculate();253 //Testing A normal module254 Assert.isTrue((loader.sorted.indexOf("arraylist-add")) > -1, "Module (arraylist-add) not found in sorted array");255 },256 "Testing arraylist-filter": function(data) {257 var loader = new Y.Loader({258 require: ["arraylist-filter"],259 ignoreRegistered: true,260 allowRollup: false261 });262 loader.calculate();263 //Testing A normal module264 Assert.isTrue((loader.sorted.indexOf("arraylist-filter")) > -1, "Module (arraylist-filter) not found in sorted array");265 },266 "Testing arraysort": function(data) {267 var loader = new Y.Loader({268 require: ["arraysort"],269 ignoreRegistered: true,270 allowRollup: false271 });272 loader.calculate();273 //Testing A normal module274 Assert.isTrue((loader.sorted.indexOf("arraysort")) > -1, "Module (arraysort) not found in sorted array");275 },276 "Testing async-queue": function(data) {277 var loader = new Y.Loader({278 require: ["async-queue"],279 ignoreRegistered: true,280 allowRollup: false281 });282 loader.calculate();283 //Testing A normal module284 Assert.isTrue((loader.sorted.indexOf("async-queue")) > -1, "Module (async-queue) not found in sorted array");285 },286 "Testing attribute": function(data) {287 var loader = new Y.Loader({288 require: ["attribute"],289 ignoreRegistered: true,290 allowRollup: false291 });292 loader.calculate();293 //Testing A rollup module294 Assert.isTrue((loader.sorted.indexOf("attribute-base")) > -1, "Module (attribute-base) not found in sorted array");295 Assert.isTrue((loader.sorted.indexOf("attribute-complex")) > -1, "Module (attribute-complex) not found in sorted array");296 },297 "Testing attribute-base": function(data) {298 var loader = new Y.Loader({299 require: ["attribute-base"],300 ignoreRegistered: true,301 allowRollup: false302 });303 loader.calculate();304 //Testing A normal module305 Assert.isTrue((loader.sorted.indexOf("attribute-base")) > -1, "Module (attribute-base) not found in sorted array");306 },307 "Testing attribute-complex": function(data) {308 var loader = new Y.Loader({309 require: ["attribute-complex"],310 ignoreRegistered: true,311 allowRollup: false312 });313 loader.calculate();314 //Testing A normal module315 Assert.isTrue((loader.sorted.indexOf("attribute-complex")) > -1, "Module (attribute-complex) not found in sorted array");316 },317 "Testing attribute-core": function(data) {318 var loader = new Y.Loader({319 require: ["attribute-core"],320 ignoreRegistered: true,321 allowRollup: false322 });323 loader.calculate();324 //Testing A normal module325 Assert.isTrue((loader.sorted.indexOf("attribute-core")) > -1, "Module (attribute-core) not found in sorted array");326 },327 "Testing attribute-events": function(data) {328 var loader = new Y.Loader({329 require: ["attribute-events"],330 ignoreRegistered: true,331 allowRollup: false332 });333 loader.calculate();334 //Testing A rollup module335 Assert.isTrue((loader.sorted.indexOf("attribute-observable")) > -1, "Module (attribute-observable) not found in sorted array");336 },337 "Testing attribute-extras": function(data) {338 var loader = new Y.Loader({339 require: ["attribute-extras"],340 ignoreRegistered: true,341 allowRollup: false342 });343 loader.calculate();344 //Testing A normal module345 Assert.isTrue((loader.sorted.indexOf("attribute-extras")) > -1, "Module (attribute-extras) not found in sorted array");346 },347 "Testing attribute-observable": function(data) {348 var loader = new Y.Loader({349 require: ["attribute-observable"],350 ignoreRegistered: true,351 allowRollup: false352 });353 loader.calculate();354 //Testing A normal module355 Assert.isTrue((loader.sorted.indexOf("attribute-observable")) > -1, "Module (attribute-observable) not found in sorted array");356 },357 "Testing autocomplete": function(data) {358 var loader = new Y.Loader({359 require: ["autocomplete"],360 ignoreRegistered: true,361 allowRollup: false362 });363 loader.calculate();364 //Testing A rollup module365 Assert.isTrue((loader.sorted.indexOf("autocomplete-base")) > -1, "Module (autocomplete-base) not found in sorted array");366 Assert.isTrue((loader.sorted.indexOf("autocomplete-sources")) > -1, "Module (autocomplete-sources) not found in sorted array");367 Assert.isTrue((loader.sorted.indexOf("autocomplete-list")) > -1, "Module (autocomplete-list) not found in sorted array");368 Assert.isTrue((loader.sorted.indexOf("autocomplete-plugin")) > -1, "Module (autocomplete-plugin) not found in sorted array");369 },370 "Testing autocomplete-base": function(data) {371 var loader = new Y.Loader({372 require: ["autocomplete-base"],373 ignoreRegistered: true,374 allowRollup: false375 });376 loader.calculate();377 //Testing A normal module378 Assert.isTrue((loader.sorted.indexOf("autocomplete-base")) > -1, "Module (autocomplete-base) not found in sorted array");379 },380 "Testing autocomplete-filters": function(data) {381 var loader = new Y.Loader({382 require: ["autocomplete-filters"],383 ignoreRegistered: true,384 allowRollup: false385 });386 loader.calculate();387 //Testing A normal module388 Assert.isTrue((loader.sorted.indexOf("autocomplete-filters")) > -1, "Module (autocomplete-filters) not found in sorted array");389 },390 "Testing autocomplete-filters-accentfold": function(data) {391 var loader = new Y.Loader({392 require: ["autocomplete-filters-accentfold"],393 ignoreRegistered: true,394 allowRollup: false395 });396 loader.calculate();397 //Testing A normal module398 Assert.isTrue((loader.sorted.indexOf("autocomplete-filters-accentfold")) > -1, "Module (autocomplete-filters-accentfold) not found in sorted array");399 },400 "Testing autocomplete-highlighters": function(data) {401 var loader = new Y.Loader({402 require: ["autocomplete-highlighters"],403 ignoreRegistered: true,404 allowRollup: false405 });406 loader.calculate();407 //Testing A normal module408 Assert.isTrue((loader.sorted.indexOf("autocomplete-highlighters")) > -1, "Module (autocomplete-highlighters) not found in sorted array");409 },410 "Testing autocomplete-highlighters-accentfold": function(data) {411 var loader = new Y.Loader({412 require: ["autocomplete-highlighters-accentfold"],413 ignoreRegistered: true,414 allowRollup: false415 });416 loader.calculate();417 //Testing A normal module418 Assert.isTrue((loader.sorted.indexOf("autocomplete-highlighters-accentfold")) > -1, "Module (autocomplete-highlighters-accentfold) not found in sorted array");419 },420 "Testing autocomplete-list": function(data) {421 var loader = new Y.Loader({422 require: ["autocomplete-list"],423 ignoreRegistered: true,424 allowRollup: false425 });426 loader.calculate();427 //Testing A normal module428 Assert.isTrue((loader.sorted.indexOf("autocomplete-list")) > -1, "Module (autocomplete-list) not found in sorted array");429 },430 "Testing autocomplete-list-keys": function(data) {431 var loader = new Y.Loader({432 require: ["autocomplete-list-keys"],433 ignoreRegistered: true,434 allowRollup: false435 });436 loader.calculate();437 //Testing A normal module438 Assert.isTrue((loader.sorted.indexOf("autocomplete-list-keys")) > -1, "Module (autocomplete-list-keys) not found in sorted array");439 },440 "Testing autocomplete-plugin": function(data) {441 var loader = new Y.Loader({442 require: ["autocomplete-plugin"],443 ignoreRegistered: true,444 allowRollup: false445 });446 loader.calculate();447 //Testing A normal module448 Assert.isTrue((loader.sorted.indexOf("autocomplete-plugin")) > -1, "Module (autocomplete-plugin) not found in sorted array");449 },450 "Testing autocomplete-sources": function(data) {451 var loader = new Y.Loader({452 require: ["autocomplete-sources"],453 ignoreRegistered: true,454 allowRollup: false455 });456 loader.calculate();457 //Testing A normal module458 Assert.isTrue((loader.sorted.indexOf("autocomplete-sources")) > -1, "Module (autocomplete-sources) not found in sorted array");459 },460 "Testing base": function(data) {461 var loader = new Y.Loader({462 require: ["base"],463 ignoreRegistered: true,464 allowRollup: false465 });466 loader.calculate();467 //Testing A rollup module468 Assert.isTrue((loader.sorted.indexOf("base-base")) > -1, "Module (base-base) not found in sorted array");469 Assert.isTrue((loader.sorted.indexOf("base-pluginhost")) > -1, "Module (base-pluginhost) not found in sorted array");470 Assert.isTrue((loader.sorted.indexOf("base-build")) > -1, "Module (base-build) not found in sorted array");471 },472 "Testing base-base": function(data) {473 var loader = new Y.Loader({474 require: ["base-base"],475 ignoreRegistered: true,476 allowRollup: false477 });478 loader.calculate();479 //Testing A normal module480 Assert.isTrue((loader.sorted.indexOf("base-base")) > -1, "Module (base-base) not found in sorted array");481 },482 "Testing base-build": function(data) {483 var loader = new Y.Loader({484 require: ["base-build"],485 ignoreRegistered: true,486 allowRollup: false487 });488 loader.calculate();489 //Testing A normal module490 Assert.isTrue((loader.sorted.indexOf("base-build")) > -1, "Module (base-build) not found in sorted array");491 },492 "Testing base-core": function(data) {493 var loader = new Y.Loader({494 require: ["base-core"],495 ignoreRegistered: true,496 allowRollup: false497 });498 loader.calculate();499 //Testing A normal module500 Assert.isTrue((loader.sorted.indexOf("base-core")) > -1, "Module (base-core) not found in sorted array");501 },502 "Testing base-observable": function(data) {503 var loader = new Y.Loader({504 require: ["base-observable"],505 ignoreRegistered: true,506 allowRollup: false507 });508 loader.calculate();509 //Testing A normal module510 Assert.isTrue((loader.sorted.indexOf("base-observable")) > -1, "Module (base-observable) not found in sorted array");511 },512 "Testing base-pluginhost": function(data) {513 var loader = new Y.Loader({514 require: ["base-pluginhost"],515 ignoreRegistered: true,516 allowRollup: false517 });518 loader.calculate();519 //Testing A normal module520 Assert.isTrue((loader.sorted.indexOf("base-pluginhost")) > -1, "Module (base-pluginhost) not found in sorted array");521 },522 "Testing button": function(data) {523 var loader = new Y.Loader({524 require: ["button"],525 ignoreRegistered: true,526 allowRollup: false527 });528 loader.calculate();529 //Testing A normal module530 Assert.isTrue((loader.sorted.indexOf("button")) > -1, "Module (button) not found in sorted array");531 },532 "Testing button-core": function(data) {533 var loader = new Y.Loader({534 require: ["button-core"],535 ignoreRegistered: true,536 allowRollup: false537 });538 loader.calculate();539 //Testing A normal module540 Assert.isTrue((loader.sorted.indexOf("button-core")) > -1, "Module (button-core) not found in sorted array");541 },542 "Testing button-group": function(data) {543 var loader = new Y.Loader({544 require: ["button-group"],545 ignoreRegistered: true,546 allowRollup: false547 });548 loader.calculate();549 //Testing A normal module550 Assert.isTrue((loader.sorted.indexOf("button-group")) > -1, "Module (button-group) not found in sorted array");551 },552 "Testing button-plugin": function(data) {553 var loader = new Y.Loader({554 require: ["button-plugin"],555 ignoreRegistered: true,556 allowRollup: false557 });558 loader.calculate();559 //Testing A normal module560 Assert.isTrue((loader.sorted.indexOf("button-plugin")) > -1, "Module (button-plugin) not found in sorted array");561 },562 "Testing cache": function(data) {563 var loader = new Y.Loader({564 require: ["cache"],565 ignoreRegistered: true,566 allowRollup: false567 });568 loader.calculate();569 //Testing A rollup module570 Assert.isTrue((loader.sorted.indexOf("cache-base")) > -1, "Module (cache-base) not found in sorted array");571 Assert.isTrue((loader.sorted.indexOf("cache-offline")) > -1, "Module (cache-offline) not found in sorted array");572 Assert.isTrue((loader.sorted.indexOf("cache-plugin")) > -1, "Module (cache-plugin) not found in sorted array");573 },574 "Testing cache-base": function(data) {575 var loader = new Y.Loader({576 require: ["cache-base"],577 ignoreRegistered: true,578 allowRollup: false579 });580 loader.calculate();581 //Testing A normal module582 Assert.isTrue((loader.sorted.indexOf("cache-base")) > -1, "Module (cache-base) not found in sorted array");583 },584 "Testing cache-offline": function(data) {585 var loader = new Y.Loader({586 require: ["cache-offline"],587 ignoreRegistered: true,588 allowRollup: false589 });590 loader.calculate();591 //Testing A normal module592 Assert.isTrue((loader.sorted.indexOf("cache-offline")) > -1, "Module (cache-offline) not found in sorted array");593 },594 "Testing cache-plugin": function(data) {595 var loader = new Y.Loader({596 require: ["cache-plugin"],597 ignoreRegistered: true,598 allowRollup: false599 });600 loader.calculate();601 //Testing A normal module602 Assert.isTrue((loader.sorted.indexOf("cache-plugin")) > -1, "Module (cache-plugin) not found in sorted array");603 },604 "Testing calendar": function(data) {605 var loader = new Y.Loader({606 require: ["calendar"],607 ignoreRegistered: true,608 allowRollup: false609 });610 loader.calculate();611 //Testing A normal module612 Assert.isTrue((loader.sorted.indexOf("calendar")) > -1, "Module (calendar) not found in sorted array");613 },614 "Testing calendar-base": function(data) {615 var loader = new Y.Loader({616 require: ["calendar-base"],617 ignoreRegistered: true,618 allowRollup: false619 });620 loader.calculate();621 //Testing A normal module622 Assert.isTrue((loader.sorted.indexOf("calendar-base")) > -1, "Module (calendar-base) not found in sorted array");623 },624 "Testing calendarnavigator": function(data) {625 var loader = new Y.Loader({626 require: ["calendarnavigator"],627 ignoreRegistered: true,628 allowRollup: false629 });630 loader.calculate();631 //Testing A normal module632 Assert.isTrue((loader.sorted.indexOf("calendarnavigator")) > -1, "Module (calendarnavigator) not found in sorted array");633 },634 "Testing charts": function(data) {635 var loader = new Y.Loader({636 require: ["charts"],637 ignoreRegistered: true,638 allowRollup: false639 });640 loader.calculate();641 //Testing A normal module642 Assert.isTrue((loader.sorted.indexOf("charts")) > -1, "Module (charts) not found in sorted array");643 },644 "Testing charts-base": function(data) {645 var loader = new Y.Loader({646 require: ["charts-base"],647 ignoreRegistered: true,648 allowRollup: false649 });650 loader.calculate();651 //Testing A normal module652 Assert.isTrue((loader.sorted.indexOf("charts-base")) > -1, "Module (charts-base) not found in sorted array");653 },654 "Testing charts-legend": function(data) {655 var loader = new Y.Loader({656 require: ["charts-legend"],657 ignoreRegistered: true,658 allowRollup: false659 });660 loader.calculate();661 //Testing A normal module662 Assert.isTrue((loader.sorted.indexOf("charts-legend")) > -1, "Module (charts-legend) not found in sorted array");663 },664 "Testing classnamemanager": function(data) {665 var loader = new Y.Loader({666 require: ["classnamemanager"],667 ignoreRegistered: true,668 allowRollup: false669 });670 loader.calculate();671 //Testing A normal module672 Assert.isTrue((loader.sorted.indexOf("classnamemanager")) > -1, "Module (classnamemanager) not found in sorted array");673 },674 "Testing clickable-rail": function(data) {675 var loader = new Y.Loader({676 require: ["clickable-rail"],677 ignoreRegistered: true,678 allowRollup: false679 });680 loader.calculate();681 //Testing A normal module682 Assert.isTrue((loader.sorted.indexOf("clickable-rail")) > -1, "Module (clickable-rail) not found in sorted array");683 },684 "Testing collection": function(data) {685 var loader = new Y.Loader({686 require: ["collection"],687 ignoreRegistered: true,688 allowRollup: false689 });690 loader.calculate();691 //Testing A rollup module692 Assert.isTrue((loader.sorted.indexOf("array-extras")) > -1, "Module (array-extras) not found in sorted array");693 Assert.isTrue((loader.sorted.indexOf("arraylist")) > -1, "Module (arraylist) not found in sorted array");694 Assert.isTrue((loader.sorted.indexOf("arraylist-add")) > -1, "Module (arraylist-add) not found in sorted array");695 Assert.isTrue((loader.sorted.indexOf("arraylist-filter")) > -1, "Module (arraylist-filter) not found in sorted array");696 Assert.isTrue((loader.sorted.indexOf("array-invoke")) > -1, "Module (array-invoke) not found in sorted array");697 },698 "Testing color": function(data) {699 var loader = new Y.Loader({700 require: ["color"],701 ignoreRegistered: true,702 allowRollup: false703 });704 loader.calculate();705 //Testing A rollup module706 Assert.isTrue((loader.sorted.indexOf("color-base")) > -1, "Module (color-base) not found in sorted array");707 Assert.isTrue((loader.sorted.indexOf("color-hsl")) > -1, "Module (color-hsl) not found in sorted array");708 Assert.isTrue((loader.sorted.indexOf("color-harmony")) > -1, "Module (color-harmony) not found in sorted array");709 },710 "Testing color-base": function(data) {711 var loader = new Y.Loader({712 require: ["color-base"],713 ignoreRegistered: true,714 allowRollup: false715 });716 loader.calculate();717 //Testing A normal module718 Assert.isTrue((loader.sorted.indexOf("color-base")) > -1, "Module (color-base) not found in sorted array");719 },720 "Testing color-harmony": function(data) {721 var loader = new Y.Loader({722 require: ["color-harmony"],723 ignoreRegistered: true,724 allowRollup: false725 });726 loader.calculate();727 //Testing A normal module728 Assert.isTrue((loader.sorted.indexOf("color-harmony")) > -1, "Module (color-harmony) not found in sorted array");729 },730 "Testing color-hsl": function(data) {731 var loader = new Y.Loader({732 require: ["color-hsl"],733 ignoreRegistered: true,734 allowRollup: false735 });736 loader.calculate();737 //Testing A normal module738 Assert.isTrue((loader.sorted.indexOf("color-hsl")) > -1, "Module (color-hsl) not found in sorted array");739 },740 "Testing color-hsv": function(data) {741 var loader = new Y.Loader({742 require: ["color-hsv"],743 ignoreRegistered: true,744 allowRollup: false745 });746 loader.calculate();747 //Testing A normal module748 Assert.isTrue((loader.sorted.indexOf("color-hsv")) > -1, "Module (color-hsv) not found in sorted array");749 },750 "Testing console": function(data) {751 var loader = new Y.Loader({752 require: ["console"],753 ignoreRegistered: true,754 allowRollup: false755 });756 loader.calculate();757 //Testing A normal module758 Assert.isTrue((loader.sorted.indexOf("console")) > -1, "Module (console) not found in sorted array");759 },760 "Testing console-filters": function(data) {761 var loader = new Y.Loader({762 require: ["console-filters"],763 ignoreRegistered: true,764 allowRollup: false765 });766 loader.calculate();767 //Testing A normal module768 Assert.isTrue((loader.sorted.indexOf("console-filters")) > -1, "Module (console-filters) not found in sorted array");769 },770 "Testing controller": function(data) {771 var loader = new Y.Loader({772 require: ["controller"],773 ignoreRegistered: true,774 allowRollup: false775 });776 loader.calculate();777 //Testing A rollup module778 Assert.isTrue((loader.sorted.indexOf("router")) > -1, "Module (router) not found in sorted array");779 },780 "Testing cookie": function(data) {781 var loader = new Y.Loader({782 require: ["cookie"],783 ignoreRegistered: true,784 allowRollup: false785 });786 loader.calculate();787 //Testing A normal module788 Assert.isTrue((loader.sorted.indexOf("cookie")) > -1, "Module (cookie) not found in sorted array");789 },790 "Testing createlink-base": function(data) {791 var loader = new Y.Loader({792 require: ["createlink-base"],793 ignoreRegistered: true,794 allowRollup: false795 });796 loader.calculate();797 //Testing A normal module798 Assert.isTrue((loader.sorted.indexOf("createlink-base")) > -1, "Module (createlink-base) not found in sorted array");799 },800 "Testing dataschema": function(data) {801 var loader = new Y.Loader({802 require: ["dataschema"],803 ignoreRegistered: true,804 allowRollup: false805 });806 loader.calculate();807 //Testing A rollup module808 Assert.isTrue((loader.sorted.indexOf("dataschema-base")) > -1, "Module (dataschema-base) not found in sorted array");809 Assert.isTrue((loader.sorted.indexOf("dataschema-json")) > -1, "Module (dataschema-json) not found in sorted array");810 Assert.isTrue((loader.sorted.indexOf("dataschema-xml")) > -1, "Module (dataschema-xml) not found in sorted array");811 Assert.isTrue((loader.sorted.indexOf("dataschema-array")) > -1, "Module (dataschema-array) not found in sorted array");812 Assert.isTrue((loader.sorted.indexOf("dataschema-text")) > -1, "Module (dataschema-text) not found in sorted array");813 },814 "Testing dataschema-array": function(data) {815 var loader = new Y.Loader({816 require: ["dataschema-array"],817 ignoreRegistered: true,818 allowRollup: false819 });820 loader.calculate();821 //Testing A normal module822 Assert.isTrue((loader.sorted.indexOf("dataschema-array")) > -1, "Module (dataschema-array) not found in sorted array");823 },824 "Testing dataschema-base": function(data) {825 var loader = new Y.Loader({826 require: ["dataschema-base"],827 ignoreRegistered: true,828 allowRollup: false829 });830 loader.calculate();831 //Testing A normal module832 Assert.isTrue((loader.sorted.indexOf("dataschema-base")) > -1, "Module (dataschema-base) not found in sorted array");833 },834 "Testing dataschema-json": function(data) {835 var loader = new Y.Loader({836 require: ["dataschema-json"],837 ignoreRegistered: true,838 allowRollup: false839 });840 loader.calculate();841 //Testing A normal module842 Assert.isTrue((loader.sorted.indexOf("dataschema-json")) > -1, "Module (dataschema-json) not found in sorted array");843 },844 "Testing dataschema-text": function(data) {845 var loader = new Y.Loader({846 require: ["dataschema-text"],847 ignoreRegistered: true,848 allowRollup: false849 });850 loader.calculate();851 //Testing A normal module852 Assert.isTrue((loader.sorted.indexOf("dataschema-text")) > -1, "Module (dataschema-text) not found in sorted array");853 },854 "Testing dataschema-xml": function(data) {855 var loader = new Y.Loader({856 require: ["dataschema-xml"],857 ignoreRegistered: true,858 allowRollup: false859 });860 loader.calculate();861 //Testing A normal module862 Assert.isTrue((loader.sorted.indexOf("dataschema-xml")) > -1, "Module (dataschema-xml) not found in sorted array");863 },864 "Testing datasource": function(data) {865 var loader = new Y.Loader({866 require: ["datasource"],867 ignoreRegistered: true,868 allowRollup: false869 });870 loader.calculate();871 //Testing A rollup module872 Assert.isTrue((loader.sorted.indexOf("datasource-local")) > -1, "Module (datasource-local) not found in sorted array");873 Assert.isTrue((loader.sorted.indexOf("datasource-io")) > -1, "Module (datasource-io) not found in sorted array");874 Assert.isTrue((loader.sorted.indexOf("datasource-get")) > -1, "Module (datasource-get) not found in sorted array");875 Assert.isTrue((loader.sorted.indexOf("datasource-function")) > -1, "Module (datasource-function) not found in sorted array");876 Assert.isTrue((loader.sorted.indexOf("datasource-cache")) > -1, "Module (datasource-cache) not found in sorted array");877 Assert.isTrue((loader.sorted.indexOf("datasource-jsonschema")) > -1, "Module (datasource-jsonschema) not found in sorted array");878 Assert.isTrue((loader.sorted.indexOf("datasource-xmlschema")) > -1, "Module (datasource-xmlschema) not found in sorted array");879 Assert.isTrue((loader.sorted.indexOf("datasource-arrayschema")) > -1, "Module (datasource-arrayschema) not found in sorted array");880 Assert.isTrue((loader.sorted.indexOf("datasource-textschema")) > -1, "Module (datasource-textschema) not found in sorted array");881 Assert.isTrue((loader.sorted.indexOf("datasource-polling")) > -1, "Module (datasource-polling) not found in sorted array");882 },883 "Testing datasource-arrayschema": function(data) {884 var loader = new Y.Loader({885 require: ["datasource-arrayschema"],886 ignoreRegistered: true,887 allowRollup: false888 });889 loader.calculate();890 //Testing A normal module891 Assert.isTrue((loader.sorted.indexOf("datasource-arrayschema")) > -1, "Module (datasource-arrayschema) not found in sorted array");892 },893 "Testing datasource-cache": function(data) {894 var loader = new Y.Loader({895 require: ["datasource-cache"],896 ignoreRegistered: true,897 allowRollup: false898 });899 loader.calculate();900 //Testing A normal module901 Assert.isTrue((loader.sorted.indexOf("datasource-cache")) > -1, "Module (datasource-cache) not found in sorted array");902 },903 "Testing datasource-function": function(data) {904 var loader = new Y.Loader({905 require: ["datasource-function"],906 ignoreRegistered: true,907 allowRollup: false908 });909 loader.calculate();910 //Testing A normal module911 Assert.isTrue((loader.sorted.indexOf("datasource-function")) > -1, "Module (datasource-function) not found in sorted array");912 },913 "Testing datasource-get": function(data) {914 var loader = new Y.Loader({915 require: ["datasource-get"],916 ignoreRegistered: true,917 allowRollup: false918 });919 loader.calculate();920 //Testing A normal module921 Assert.isTrue((loader.sorted.indexOf("datasource-get")) > -1, "Module (datasource-get) not found in sorted array");922 },923 "Testing datasource-io": function(data) {924 var loader = new Y.Loader({925 require: ["datasource-io"],926 ignoreRegistered: true,927 allowRollup: false928 });929 loader.calculate();930 //Testing A normal module931 Assert.isTrue((loader.sorted.indexOf("datasource-io")) > -1, "Module (datasource-io) not found in sorted array");932 },933 "Testing datasource-jsonschema": function(data) {934 var loader = new Y.Loader({935 require: ["datasource-jsonschema"],936 ignoreRegistered: true,937 allowRollup: false938 });939 loader.calculate();940 //Testing A normal module941 Assert.isTrue((loader.sorted.indexOf("datasource-jsonschema")) > -1, "Module (datasource-jsonschema) not found in sorted array");942 },943 "Testing datasource-local": function(data) {944 var loader = new Y.Loader({945 require: ["datasource-local"],946 ignoreRegistered: true,947 allowRollup: false948 });949 loader.calculate();950 //Testing A normal module951 Assert.isTrue((loader.sorted.indexOf("datasource-local")) > -1, "Module (datasource-local) not found in sorted array");952 },953 "Testing datasource-polling": function(data) {954 var loader = new Y.Loader({955 require: ["datasource-polling"],956 ignoreRegistered: true,957 allowRollup: false958 });959 loader.calculate();960 //Testing A normal module961 Assert.isTrue((loader.sorted.indexOf("datasource-polling")) > -1, "Module (datasource-polling) not found in sorted array");962 },963 "Testing datasource-textschema": function(data) {964 var loader = new Y.Loader({965 require: ["datasource-textschema"],966 ignoreRegistered: true,967 allowRollup: false968 });969 loader.calculate();970 //Testing A normal module971 Assert.isTrue((loader.sorted.indexOf("datasource-textschema")) > -1, "Module (datasource-textschema) not found in sorted array");972 },973 "Testing datasource-xmlschema": function(data) {974 var loader = new Y.Loader({975 require: ["datasource-xmlschema"],976 ignoreRegistered: true,977 allowRollup: false978 });979 loader.calculate();980 //Testing A normal module981 Assert.isTrue((loader.sorted.indexOf("datasource-xmlschema")) > -1, "Module (datasource-xmlschema) not found in sorted array");982 },983 "Testing datatable": function(data) {984 var loader = new Y.Loader({985 require: ["datatable"],986 ignoreRegistered: true,987 allowRollup: false988 });989 loader.calculate();990 //Testing A rollup module991 Assert.isTrue((loader.sorted.indexOf("datatable-core")) > -1, "Module (datatable-core) not found in sorted array");992 Assert.isTrue((loader.sorted.indexOf("datatable-table")) > -1, "Module (datatable-table) not found in sorted array");993 Assert.isTrue((loader.sorted.indexOf("datatable-head")) > -1, "Module (datatable-head) not found in sorted array");994 Assert.isTrue((loader.sorted.indexOf("datatable-body")) > -1, "Module (datatable-body) not found in sorted array");995 Assert.isTrue((loader.sorted.indexOf("datatable-base")) > -1, "Module (datatable-base) not found in sorted array");996 Assert.isTrue((loader.sorted.indexOf("datatable-column-widths")) > -1, "Module (datatable-column-widths) not found in sorted array");997 Assert.isTrue((loader.sorted.indexOf("datatable-message")) > -1, "Module (datatable-message) not found in sorted array");998 Assert.isTrue((loader.sorted.indexOf("datatable-mutable")) > -1, "Module (datatable-mutable) not found in sorted array");999 Assert.isTrue((loader.sorted.indexOf("datatable-sort")) > -1, "Module (datatable-sort) not found in sorted array");1000 Assert.isTrue((loader.sorted.indexOf("datatable-datasource")) > -1, "Module (datatable-datasource) not found in sorted array");1001 },1002 "Testing datatable-base": function(data) {1003 var loader = new Y.Loader({1004 require: ["datatable-base"],1005 ignoreRegistered: true,1006 allowRollup: false1007 });1008 loader.calculate();1009 //Testing A normal module1010 Assert.isTrue((loader.sorted.indexOf("datatable-base")) > -1, "Module (datatable-base) not found in sorted array");1011 },1012 "Testing datatable-base-deprecated": function(data) {1013 var loader = new Y.Loader({1014 require: ["datatable-base-deprecated"],1015 ignoreRegistered: true,1016 allowRollup: false1017 });1018 loader.calculate();1019 //Testing A normal module1020 Assert.isTrue((loader.sorted.indexOf("datatable-base-deprecated")) > -1, "Module (datatable-base-deprecated) not found in sorted array");1021 },1022 "Testing datatable-body": function(data) {1023 var loader = new Y.Loader({1024 require: ["datatable-body"],1025 ignoreRegistered: true,1026 allowRollup: false1027 });1028 loader.calculate();1029 //Testing A normal module1030 Assert.isTrue((loader.sorted.indexOf("datatable-body")) > -1, "Module (datatable-body) not found in sorted array");1031 },1032 "Testing datatable-column-widths": function(data) {1033 var loader = new Y.Loader({1034 require: ["datatable-column-widths"],1035 ignoreRegistered: true,1036 allowRollup: false1037 });1038 loader.calculate();1039 //Testing A normal module1040 Assert.isTrue((loader.sorted.indexOf("datatable-column-widths")) > -1, "Module (datatable-column-widths) not found in sorted array");1041 },1042 "Testing datatable-core": function(data) {1043 var loader = new Y.Loader({1044 require: ["datatable-core"],1045 ignoreRegistered: true,1046 allowRollup: false1047 });1048 loader.calculate();1049 //Testing A normal module1050 Assert.isTrue((loader.sorted.indexOf("datatable-core")) > -1, "Module (datatable-core) not found in sorted array");1051 },1052 "Testing datatable-datasource": function(data) {1053 var loader = new Y.Loader({1054 require: ["datatable-datasource"],1055 ignoreRegistered: true,1056 allowRollup: false1057 });1058 loader.calculate();1059 //Testing A normal module1060 Assert.isTrue((loader.sorted.indexOf("datatable-datasource")) > -1, "Module (datatable-datasource) not found in sorted array");1061 },1062 "Testing datatable-datasource-deprecated": function(data) {1063 var loader = new Y.Loader({1064 require: ["datatable-datasource-deprecated"],1065 ignoreRegistered: true,1066 allowRollup: false1067 });1068 loader.calculate();1069 //Testing A normal module1070 Assert.isTrue((loader.sorted.indexOf("datatable-datasource-deprecated")) > -1, "Module (datatable-datasource-deprecated) not found in sorted array");1071 },1072 "Testing datatable-deprecated": function(data) {1073 var loader = new Y.Loader({1074 require: ["datatable-deprecated"],1075 ignoreRegistered: true,1076 allowRollup: false1077 });1078 loader.calculate();1079 //Testing A rollup module1080 Assert.isTrue((loader.sorted.indexOf("datatable-base-deprecated")) > -1, "Module (datatable-base-deprecated) not found in sorted array");1081 Assert.isTrue((loader.sorted.indexOf("datatable-datasource-deprecated")) > -1, "Module (datatable-datasource-deprecated) not found in sorted array");1082 Assert.isTrue((loader.sorted.indexOf("datatable-sort-deprecated")) > -1, "Module (datatable-sort-deprecated) not found in sorted array");1083 Assert.isTrue((loader.sorted.indexOf("datatable-scroll-deprecated")) > -1, "Module (datatable-scroll-deprecated) not found in sorted array");1084 },1085 "Testing datatable-head": function(data) {1086 var loader = new Y.Loader({1087 require: ["datatable-head"],1088 ignoreRegistered: true,1089 allowRollup: false1090 });1091 loader.calculate();1092 //Testing A normal module1093 Assert.isTrue((loader.sorted.indexOf("datatable-head")) > -1, "Module (datatable-head) not found in sorted array");1094 },1095 "Testing datatable-message": function(data) {1096 var loader = new Y.Loader({1097 require: ["datatable-message"],1098 ignoreRegistered: true,1099 allowRollup: false1100 });1101 loader.calculate();1102 //Testing A normal module1103 Assert.isTrue((loader.sorted.indexOf("datatable-message")) > -1, "Module (datatable-message) not found in sorted array");1104 },1105 "Testing datatable-mutable": function(data) {1106 var loader = new Y.Loader({1107 require: ["datatable-mutable"],1108 ignoreRegistered: true,1109 allowRollup: false1110 });1111 loader.calculate();1112 //Testing A normal module1113 Assert.isTrue((loader.sorted.indexOf("datatable-mutable")) > -1, "Module (datatable-mutable) not found in sorted array");1114 },1115 "Testing datatable-scroll": function(data) {1116 var loader = new Y.Loader({1117 require: ["datatable-scroll"],1118 ignoreRegistered: true,1119 allowRollup: false1120 });1121 loader.calculate();1122 //Testing A normal module1123 Assert.isTrue((loader.sorted.indexOf("datatable-scroll")) > -1, "Module (datatable-scroll) not found in sorted array");1124 },1125 "Testing datatable-scroll-deprecated": function(data) {1126 var loader = new Y.Loader({1127 require: ["datatable-scroll-deprecated"],1128 ignoreRegistered: true,1129 allowRollup: false1130 });1131 loader.calculate();1132 //Testing A normal module1133 Assert.isTrue((loader.sorted.indexOf("datatable-scroll-deprecated")) > -1, "Module (datatable-scroll-deprecated) not found in sorted array");1134 },1135 "Testing datatable-sort": function(data) {1136 var loader = new Y.Loader({1137 require: ["datatable-sort"],1138 ignoreRegistered: true,1139 allowRollup: false1140 });1141 loader.calculate();1142 //Testing A normal module1143 Assert.isTrue((loader.sorted.indexOf("datatable-sort")) > -1, "Module (datatable-sort) not found in sorted array");1144 },1145 "Testing datatable-sort-deprecated": function(data) {1146 var loader = new Y.Loader({1147 require: ["datatable-sort-deprecated"],1148 ignoreRegistered: true,1149 allowRollup: false1150 });1151 loader.calculate();1152 //Testing A normal module1153 Assert.isTrue((loader.sorted.indexOf("datatable-sort-deprecated")) > -1, "Module (datatable-sort-deprecated) not found in sorted array");1154 },1155 "Testing datatable-table": function(data) {1156 var loader = new Y.Loader({1157 require: ["datatable-table"],1158 ignoreRegistered: true,1159 allowRollup: false1160 });1161 loader.calculate();1162 //Testing A normal module1163 Assert.isTrue((loader.sorted.indexOf("datatable-table")) > -1, "Module (datatable-table) not found in sorted array");1164 },1165 "Testing datatype": function(data) {1166 var loader = new Y.Loader({1167 require: ["datatype"],1168 ignoreRegistered: true,1169 allowRollup: false1170 });1171 loader.calculate();1172 //Testing A rollup module1173 //Testing A rollup of a rollup module ( datatype )1174 Assert.isTrue((loader.sorted.indexOf("datatype-date-parse")) > -1, "Module (datatype-date-parse) not found in sorted array");1175 Assert.isTrue((loader.sorted.indexOf("datatype-date-format")) > -1, "Module (datatype-date-format) not found in sorted array");1176 Assert.isTrue((loader.sorted.indexOf("datatype-date-math")) > -1, "Module (datatype-date-math) not found in sorted array");1177 //Testing A rollup of a rollup module ( datatype )1178 Assert.isTrue((loader.sorted.indexOf("datatype-number-parse")) > -1, "Module (datatype-number-parse) not found in sorted array");1179 Assert.isTrue((loader.sorted.indexOf("datatype-number-format")) > -1, "Module (datatype-number-format) not found in sorted array");1180 //Testing A rollup of a rollup module ( datatype )1181 Assert.isTrue((loader.sorted.indexOf("datatype-xml-parse")) > -1, "Module (datatype-xml-parse) not found in sorted array");1182 Assert.isTrue((loader.sorted.indexOf("datatype-xml-format")) > -1, "Module (datatype-xml-format) not found in sorted array");1183 },1184 "Testing datatype-date": function(data) {1185 var loader = new Y.Loader({1186 require: ["datatype-date"],1187 ignoreRegistered: true,1188 allowRollup: false1189 });1190 loader.calculate();1191 //Testing A rollup module1192 Assert.isTrue((loader.sorted.indexOf("datatype-date-parse")) > -1, "Module (datatype-date-parse) not found in sorted array");1193 Assert.isTrue((loader.sorted.indexOf("datatype-date-format")) > -1, "Module (datatype-date-format) not found in sorted array");1194 Assert.isTrue((loader.sorted.indexOf("datatype-date-math")) > -1, "Module (datatype-date-math) not found in sorted array");1195 },1196 "Testing datatype-date-format": function(data) {1197 var loader = new Y.Loader({1198 require: ["datatype-date-format"],1199 ignoreRegistered: true,1200 allowRollup: false1201 });1202 loader.calculate();1203 //Testing A normal module1204 Assert.isTrue((loader.sorted.indexOf("datatype-date-format")) > -1, "Module (datatype-date-format) not found in sorted array");1205 },1206 "Testing datatype-date-math": function(data) {1207 var loader = new Y.Loader({1208 require: ["datatype-date-math"],1209 ignoreRegistered: true,1210 allowRollup: false1211 });1212 loader.calculate();1213 //Testing A normal module1214 Assert.isTrue((loader.sorted.indexOf("datatype-date-math")) > -1, "Module (datatype-date-math) not found in sorted array");1215 },1216 "Testing datatype-date-parse": function(data) {1217 var loader = new Y.Loader({1218 require: ["datatype-date-parse"],1219 ignoreRegistered: true,1220 allowRollup: false1221 });1222 loader.calculate();1223 //Testing A normal module1224 Assert.isTrue((loader.sorted.indexOf("datatype-date-parse")) > -1, "Module (datatype-date-parse) not found in sorted array");1225 },1226 "Testing datatype-number": function(data) {1227 var loader = new Y.Loader({1228 require: ["datatype-number"],1229 ignoreRegistered: true,1230 allowRollup: false1231 });1232 loader.calculate();1233 //Testing A rollup module1234 Assert.isTrue((loader.sorted.indexOf("datatype-number-parse")) > -1, "Module (datatype-number-parse) not found in sorted array");1235 Assert.isTrue((loader.sorted.indexOf("datatype-number-format")) > -1, "Module (datatype-number-format) not found in sorted array");1236 },1237 "Testing datatype-number-format": function(data) {1238 var loader = new Y.Loader({1239 require: ["datatype-number-format"],1240 ignoreRegistered: true,1241 allowRollup: false1242 });1243 loader.calculate();1244 //Testing A normal module1245 Assert.isTrue((loader.sorted.indexOf("datatype-number-format")) > -1, "Module (datatype-number-format) not found in sorted array");1246 },1247 "Testing datatype-number-parse": function(data) {1248 var loader = new Y.Loader({1249 require: ["datatype-number-parse"],1250 ignoreRegistered: true,1251 allowRollup: false1252 });1253 loader.calculate();1254 //Testing A normal module1255 Assert.isTrue((loader.sorted.indexOf("datatype-number-parse")) > -1, "Module (datatype-number-parse) not found in sorted array");1256 },1257 "Testing datatype-xml": function(data) {1258 var loader = new Y.Loader({1259 require: ["datatype-xml"],1260 ignoreRegistered: true,1261 allowRollup: false1262 });1263 loader.calculate();1264 //Testing A rollup module1265 Assert.isTrue((loader.sorted.indexOf("datatype-xml-parse")) > -1, "Module (datatype-xml-parse) not found in sorted array");1266 Assert.isTrue((loader.sorted.indexOf("datatype-xml-format")) > -1, "Module (datatype-xml-format) not found in sorted array");1267 },1268 "Testing datatype-xml-format": function(data) {1269 var loader = new Y.Loader({1270 require: ["datatype-xml-format"],1271 ignoreRegistered: true,1272 allowRollup: false1273 });1274 loader.calculate();1275 //Testing A normal module1276 Assert.isTrue((loader.sorted.indexOf("datatype-xml-format")) > -1, "Module (datatype-xml-format) not found in sorted array");1277 },1278 "Testing datatype-xml-parse": function(data) {1279 var loader = new Y.Loader({1280 require: ["datatype-xml-parse"],1281 ignoreRegistered: true,1282 allowRollup: false1283 });1284 loader.calculate();1285 //Testing A normal module1286 Assert.isTrue((loader.sorted.indexOf("datatype-xml-parse")) > -1, "Module (datatype-xml-parse) not found in sorted array");1287 },1288 "Testing dd": function(data) {1289 var loader = new Y.Loader({1290 require: ["dd"],1291 ignoreRegistered: true,1292 allowRollup: false1293 });1294 loader.calculate();1295 //Testing A rollup module1296 Assert.isTrue((loader.sorted.indexOf("dd-ddm-base")) > -1, "Module (dd-ddm-base) not found in sorted array");1297 Assert.isTrue((loader.sorted.indexOf("dd-ddm")) > -1, "Module (dd-ddm) not found in sorted array");1298 Assert.isTrue((loader.sorted.indexOf("dd-ddm-drop")) > -1, "Module (dd-ddm-drop) not found in sorted array");1299 Assert.isTrue((loader.sorted.indexOf("dd-drag")) > -1, "Module (dd-drag) not found in sorted array");1300 Assert.isTrue((loader.sorted.indexOf("dd-proxy")) > -1, "Module (dd-proxy) not found in sorted array");1301 Assert.isTrue((loader.sorted.indexOf("dd-constrain")) > -1, "Module (dd-constrain) not found in sorted array");1302 Assert.isTrue((loader.sorted.indexOf("dd-drop")) > -1, "Module (dd-drop) not found in sorted array");1303 Assert.isTrue((loader.sorted.indexOf("dd-scroll")) > -1, "Module (dd-scroll) not found in sorted array");1304 Assert.isTrue((loader.sorted.indexOf("dd-delegate")) > -1, "Module (dd-delegate) not found in sorted array");1305 },1306 "Testing dd-constrain": function(data) {1307 var loader = new Y.Loader({1308 require: ["dd-constrain"],1309 ignoreRegistered: true,1310 allowRollup: false1311 });1312 loader.calculate();1313 //Testing A normal module1314 Assert.isTrue((loader.sorted.indexOf("dd-constrain")) > -1, "Module (dd-constrain) not found in sorted array");1315 },1316 "Testing dd-ddm": function(data) {1317 var loader = new Y.Loader({1318 require: ["dd-ddm"],1319 ignoreRegistered: true,1320 allowRollup: false1321 });1322 loader.calculate();1323 //Testing A normal module1324 Assert.isTrue((loader.sorted.indexOf("dd-ddm")) > -1, "Module (dd-ddm) not found in sorted array");1325 },1326 "Testing dd-ddm-base": function(data) {1327 var loader = new Y.Loader({1328 require: ["dd-ddm-base"],1329 ignoreRegistered: true,1330 allowRollup: false1331 });1332 loader.calculate();1333 //Testing A normal module1334 Assert.isTrue((loader.sorted.indexOf("dd-ddm-base")) > -1, "Module (dd-ddm-base) not found in sorted array");1335 },1336 "Testing dd-ddm-drop": function(data) {1337 var loader = new Y.Loader({1338 require: ["dd-ddm-drop"],1339 ignoreRegistered: true,1340 allowRollup: false1341 });1342 loader.calculate();1343 //Testing A normal module1344 Assert.isTrue((loader.sorted.indexOf("dd-ddm-drop")) > -1, "Module (dd-ddm-drop) not found in sorted array");1345 },1346 "Testing dd-delegate": function(data) {1347 var loader = new Y.Loader({1348 require: ["dd-delegate"],1349 ignoreRegistered: true,1350 allowRollup: false1351 });1352 loader.calculate();1353 //Testing A normal module1354 Assert.isTrue((loader.sorted.indexOf("dd-delegate")) > -1, "Module (dd-delegate) not found in sorted array");1355 },1356 "Testing dd-drag": function(data) {1357 var loader = new Y.Loader({1358 require: ["dd-drag"],1359 ignoreRegistered: true,1360 allowRollup: false1361 });1362 loader.calculate();1363 //Testing A normal module1364 Assert.isTrue((loader.sorted.indexOf("dd-drag")) > -1, "Module (dd-drag) not found in sorted array");1365 },1366 "Testing dd-drop": function(data) {1367 var loader = new Y.Loader({1368 require: ["dd-drop"],1369 ignoreRegistered: true,1370 allowRollup: false1371 });1372 loader.calculate();1373 //Testing A normal module1374 Assert.isTrue((loader.sorted.indexOf("dd-drop")) > -1, "Module (dd-drop) not found in sorted array");1375 },1376 "Testing dd-drop-plugin": function(data) {1377 var loader = new Y.Loader({1378 require: ["dd-drop-plugin"],1379 ignoreRegistered: true,1380 allowRollup: false1381 });1382 loader.calculate();1383 //Testing A normal module1384 Assert.isTrue((loader.sorted.indexOf("dd-drop-plugin")) > -1, "Module (dd-drop-plugin) not found in sorted array");1385 },1386 "Testing dd-gestures": function(data) {1387 var loader = new Y.Loader({1388 require: ["dd-gestures"],1389 ignoreRegistered: true,1390 allowRollup: false1391 });1392 loader.calculate();1393 //Testing A normal module1394 Assert.isTrue((loader.sorted.indexOf("dd-gestures")) > -1, "Module (dd-gestures) not found in sorted array");1395 },1396 "Testing dd-plugin": function(data) {1397 var loader = new Y.Loader({1398 require: ["dd-plugin"],1399 ignoreRegistered: true,1400 allowRollup: false1401 });1402 loader.calculate();1403 //Testing A normal module1404 Assert.isTrue((loader.sorted.indexOf("dd-plugin")) > -1, "Module (dd-plugin) not found in sorted array");1405 },1406 "Testing dd-proxy": function(data) {1407 var loader = new Y.Loader({1408 require: ["dd-proxy"],1409 ignoreRegistered: true,1410 allowRollup: false1411 });1412 loader.calculate();1413 //Testing A normal module1414 Assert.isTrue((loader.sorted.indexOf("dd-proxy")) > -1, "Module (dd-proxy) not found in sorted array");1415 },1416 "Testing dd-scroll": function(data) {1417 var loader = new Y.Loader({1418 require: ["dd-scroll"],1419 ignoreRegistered: true,1420 allowRollup: false1421 });1422 loader.calculate();1423 //Testing A normal module1424 Assert.isTrue((loader.sorted.indexOf("dd-scroll")) > -1, "Module (dd-scroll) not found in sorted array");1425 },1426 "Testing dial": function(data) {1427 var loader = new Y.Loader({1428 require: ["dial"],1429 ignoreRegistered: true,1430 allowRollup: false1431 });1432 loader.calculate();1433 //Testing A normal module1434 Assert.isTrue((loader.sorted.indexOf("dial")) > -1, "Module (dial) not found in sorted array");1435 },1436 "Testing dom": function(data) {1437 var loader = new Y.Loader({1438 require: ["dom"],1439 ignoreRegistered: true,1440 allowRollup: false1441 });1442 loader.calculate();1443 //Testing A rollup module1444 Assert.isTrue((loader.sorted.indexOf("dom-base")) > -1, "Module (dom-base) not found in sorted array");1445 Assert.isTrue((loader.sorted.indexOf("dom-screen")) > -1, "Module (dom-screen) not found in sorted array");1446 Assert.isTrue((loader.sorted.indexOf("dom-style")) > -1, "Module (dom-style) not found in sorted array");1447 Assert.isTrue((loader.sorted.indexOf("selector-native")) > -1, "Module (selector-native) not found in sorted array");1448 Assert.isTrue((loader.sorted.indexOf("selector")) > -1, "Module (selector) not found in sorted array");1449 },1450 "Testing dom-base": function(data) {1451 var loader = new Y.Loader({1452 require: ["dom-base"],1453 ignoreRegistered: true,1454 allowRollup: false1455 });1456 loader.calculate();1457 //Testing A normal module1458 Assert.isTrue((loader.sorted.indexOf("dom-base")) > -1, "Module (dom-base) not found in sorted array");1459 },1460 "Testing dom-core": function(data) {1461 var loader = new Y.Loader({1462 require: ["dom-core"],1463 ignoreRegistered: true,1464 allowRollup: false1465 });1466 loader.calculate();1467 //Testing A normal module1468 Assert.isTrue((loader.sorted.indexOf("dom-core")) > -1, "Module (dom-core) not found in sorted array");1469 },1470 "Testing dom-deprecated": function(data) {1471 var loader = new Y.Loader({1472 require: ["dom-deprecated"],1473 ignoreRegistered: true,1474 allowRollup: false1475 });1476 loader.calculate();1477 //Testing A normal module1478 Assert.isTrue((loader.sorted.indexOf("dom-deprecated")) > -1, "Module (dom-deprecated) not found in sorted array");1479 },1480 "Testing dom-screen": function(data) {1481 var loader = new Y.Loader({1482 require: ["dom-screen"],1483 ignoreRegistered: true,1484 allowRollup: false1485 });1486 loader.calculate();1487 //Testing A normal module1488 Assert.isTrue((loader.sorted.indexOf("dom-screen")) > -1, "Module (dom-screen) not found in sorted array");1489 },1490 "Testing dom-style": function(data) {1491 var loader = new Y.Loader({1492 require: ["dom-style"],1493 ignoreRegistered: true,1494 allowRollup: false1495 });1496 loader.calculate();1497 //Testing A normal module1498 Assert.isTrue((loader.sorted.indexOf("dom-style")) > -1, "Module (dom-style) not found in sorted array");1499 },1500 "Testing dom-style-ie": function(data) {1501 var loader = new Y.Loader({1502 require: ["dom-style-ie"],1503 ignoreRegistered: true,1504 allowRollup: false1505 });1506 loader.calculate();1507 //Testing A normal module1508 Assert.isTrue((loader.sorted.indexOf("dom-style-ie")) > -1, "Module (dom-style-ie) not found in sorted array");1509 },1510 "Testing dump": function(data) {1511 var loader = new Y.Loader({1512 require: ["dump"],1513 ignoreRegistered: true,1514 allowRollup: false1515 });1516 loader.calculate();1517 //Testing A normal module1518 Assert.isTrue((loader.sorted.indexOf("dump")) > -1, "Module (dump) not found in sorted array");1519 },1520 "Testing editor": function(data) {1521 var loader = new Y.Loader({1522 require: ["editor"],1523 ignoreRegistered: true,1524 allowRollup: false1525 });1526 loader.calculate();1527 //Testing A rollup module1528 Assert.isTrue((loader.sorted.indexOf("frame")) > -1, "Module (frame) not found in sorted array");1529 Assert.isTrue((loader.sorted.indexOf("editor-selection")) > -1, "Module (editor-selection) not found in sorted array");1530 Assert.isTrue((loader.sorted.indexOf("exec-command")) > -1, "Module (exec-command) not found in sorted array");1531 Assert.isTrue((loader.sorted.indexOf("editor-base")) > -1, "Module (editor-base) not found in sorted array");1532 Assert.isTrue((loader.sorted.indexOf("editor-para")) > -1, "Module (editor-para) not found in sorted array");1533 Assert.isTrue((loader.sorted.indexOf("editor-br")) > -1, "Module (editor-br) not found in sorted array");1534 Assert.isTrue((loader.sorted.indexOf("editor-bidi")) > -1, "Module (editor-bidi) not found in sorted array");1535 Assert.isTrue((loader.sorted.indexOf("editor-tab")) > -1, "Module (editor-tab) not found in sorted array");1536 Assert.isTrue((loader.sorted.indexOf("createlink-base")) > -1, "Module (createlink-base) not found in sorted array");1537 },1538 "Testing editor-base": function(data) {1539 var loader = new Y.Loader({1540 require: ["editor-base"],1541 ignoreRegistered: true,1542 allowRollup: false1543 });1544 loader.calculate();1545 //Testing A normal module1546 Assert.isTrue((loader.sorted.indexOf("editor-base")) > -1, "Module (editor-base) not found in sorted array");1547 },1548 "Testing editor-bidi": function(data) {1549 var loader = new Y.Loader({1550 require: ["editor-bidi"],1551 ignoreRegistered: true,1552 allowRollup: false1553 });1554 loader.calculate();1555 //Testing A normal module1556 Assert.isTrue((loader.sorted.indexOf("editor-bidi")) > -1, "Module (editor-bidi) not found in sorted array");1557 },1558 "Testing editor-br": function(data) {1559 var loader = new Y.Loader({1560 require: ["editor-br"],1561 ignoreRegistered: true,1562 allowRollup: false1563 });1564 loader.calculate();1565 //Testing A normal module1566 Assert.isTrue((loader.sorted.indexOf("editor-br")) > -1, "Module (editor-br) not found in sorted array");1567 },1568 "Testing editor-lists": function(data) {1569 var loader = new Y.Loader({1570 require: ["editor-lists"],1571 ignoreRegistered: true,1572 allowRollup: false1573 });1574 loader.calculate();1575 //Testing A normal module1576 Assert.isTrue((loader.sorted.indexOf("editor-lists")) > -1, "Module (editor-lists) not found in sorted array");1577 },1578 "Testing editor-para": function(data) {1579 var loader = new Y.Loader({1580 require: ["editor-para"],1581 ignoreRegistered: true,1582 allowRollup: false1583 });1584 loader.calculate();1585 //Testing A normal module1586 Assert.isTrue((loader.sorted.indexOf("editor-para")) > -1, "Module (editor-para) not found in sorted array");1587 },1588 "Testing editor-para-base": function(data) {1589 var loader = new Y.Loader({1590 require: ["editor-para-base"],1591 ignoreRegistered: true,1592 allowRollup: false1593 });1594 loader.calculate();1595 //Testing A normal module1596 Assert.isTrue((loader.sorted.indexOf("editor-para-base")) > -1, "Module (editor-para-base) not found in sorted array");1597 },1598 "Testing editor-para-ie": function(data) {1599 var loader = new Y.Loader({1600 require: ["editor-para-ie"],1601 ignoreRegistered: true,1602 allowRollup: false1603 });1604 loader.calculate();1605 //Testing A normal module1606 Assert.isTrue((loader.sorted.indexOf("editor-para-ie")) > -1, "Module (editor-para-ie) not found in sorted array");1607 },1608 "Testing editor-selection": function(data) {1609 var loader = new Y.Loader({1610 require: ["editor-selection"],1611 ignoreRegistered: true,1612 allowRollup: false1613 });1614 loader.calculate();1615 //Testing A normal module1616 Assert.isTrue((loader.sorted.indexOf("editor-selection")) > -1, "Module (editor-selection) not found in sorted array");1617 },1618 "Testing editor-tab": function(data) {1619 var loader = new Y.Loader({1620 require: ["editor-tab"],1621 ignoreRegistered: true,1622 allowRollup: false1623 });1624 loader.calculate();1625 //Testing A normal module1626 Assert.isTrue((loader.sorted.indexOf("editor-tab")) > -1, "Module (editor-tab) not found in sorted array");1627 },1628 "Testing escape": function(data) {1629 var loader = new Y.Loader({1630 require: ["escape"],1631 ignoreRegistered: true,1632 allowRollup: false1633 });1634 loader.calculate();1635 //Testing A normal module1636 Assert.isTrue((loader.sorted.indexOf("escape")) > -1, "Module (escape) not found in sorted array");1637 },1638 "Testing event": function(data) {1639 var loader = new Y.Loader({1640 require: ["event"],1641 ignoreRegistered: true,1642 allowRollup: false1643 });1644 loader.calculate();1645 //Testing A rollup module1646 Assert.isTrue((loader.sorted.indexOf("event-base")) > -1, "Module (event-base) not found in sorted array");1647 Assert.isTrue((loader.sorted.indexOf("event-delegate")) > -1, "Module (event-delegate) not found in sorted array");1648 Assert.isTrue((loader.sorted.indexOf("event-synthetic")) > -1, "Module (event-synthetic) not found in sorted array");1649 Assert.isTrue((loader.sorted.indexOf("event-mousewheel")) > -1, "Module (event-mousewheel) not found in sorted array");1650 Assert.isTrue((loader.sorted.indexOf("event-mouseenter")) > -1, "Module (event-mouseenter) not found in sorted array");1651 Assert.isTrue((loader.sorted.indexOf("event-key")) > -1, "Module (event-key) not found in sorted array");1652 Assert.isTrue((loader.sorted.indexOf("event-focus")) > -1, "Module (event-focus) not found in sorted array");1653 Assert.isTrue((loader.sorted.indexOf("event-resize")) > -1, "Module (event-resize) not found in sorted array");1654 Assert.isTrue((loader.sorted.indexOf("event-hover")) > -1, "Module (event-hover) not found in sorted array");1655 Assert.isTrue((loader.sorted.indexOf("event-outside")) > -1, "Module (event-outside) not found in sorted array");1656 Assert.isTrue((loader.sorted.indexOf("event-touch")) > -1, "Module (event-touch) not found in sorted array");1657 Assert.isTrue((loader.sorted.indexOf("event-move")) > -1, "Module (event-move) not found in sorted array");1658 Assert.isTrue((loader.sorted.indexOf("event-flick")) > -1, "Module (event-flick) not found in sorted array");1659 Assert.isTrue((loader.sorted.indexOf("event-valuechange")) > -1, "Module (event-valuechange) not found in sorted array");1660 Assert.isTrue((loader.sorted.indexOf("event-tap")) > -1, "Module (event-tap) not found in sorted array");1661 },1662 "Testing event-base": function(data) {1663 var loader = new Y.Loader({1664 require: ["event-base"],1665 ignoreRegistered: true,1666 allowRollup: false1667 });1668 loader.calculate();1669 //Testing A normal module1670 Assert.isTrue((loader.sorted.indexOf("event-base")) > -1, "Module (event-base) not found in sorted array");1671 },1672 "Testing event-base-ie": function(data) {1673 var loader = new Y.Loader({1674 require: ["event-base-ie"],1675 ignoreRegistered: true,1676 allowRollup: false1677 });1678 loader.calculate();1679 //Testing A normal module1680 Assert.isTrue((loader.sorted.indexOf("event-base-ie")) > -1, "Module (event-base-ie) not found in sorted array");1681 },1682 "Testing event-contextmenu": function(data) {1683 var loader = new Y.Loader({1684 require: ["event-contextmenu"],1685 ignoreRegistered: true,1686 allowRollup: false1687 });1688 loader.calculate();1689 //Testing A normal module1690 Assert.isTrue((loader.sorted.indexOf("event-contextmenu")) > -1, "Module (event-contextmenu) not found in sorted array");1691 },1692 "Testing event-custom": function(data) {1693 var loader = new Y.Loader({1694 require: ["event-custom"],1695 ignoreRegistered: true,1696 allowRollup: false1697 });1698 loader.calculate();1699 //Testing A rollup module1700 Assert.isTrue((loader.sorted.indexOf("event-custom-base")) > -1, "Module (event-custom-base) not found in sorted array");1701 Assert.isTrue((loader.sorted.indexOf("event-custom-complex")) > -1, "Module (event-custom-complex) not found in sorted array");1702 },1703 "Testing event-custom-base": function(data) {1704 var loader = new Y.Loader({1705 require: ["event-custom-base"],1706 ignoreRegistered: true,1707 allowRollup: false1708 });1709 loader.calculate();1710 //Testing A normal module1711 Assert.isTrue((loader.sorted.indexOf("event-custom-base")) > -1, "Module (event-custom-base) not found in sorted array");1712 },1713 "Testing event-custom-complex": function(data) {1714 var loader = new Y.Loader({1715 require: ["event-custom-complex"],1716 ignoreRegistered: true,1717 allowRollup: false1718 });1719 loader.calculate();1720 //Testing A normal module1721 Assert.isTrue((loader.sorted.indexOf("event-custom-complex")) > -1, "Module (event-custom-complex) not found in sorted array");1722 },1723 "Testing event-delegate": function(data) {1724 var loader = new Y.Loader({1725 require: ["event-delegate"],1726 ignoreRegistered: true,1727 allowRollup: false1728 });1729 loader.calculate();1730 //Testing A normal module1731 Assert.isTrue((loader.sorted.indexOf("event-delegate")) > -1, "Module (event-delegate) not found in sorted array");1732 },1733 "Testing event-flick": function(data) {1734 var loader = new Y.Loader({1735 require: ["event-flick"],1736 ignoreRegistered: true,1737 allowRollup: false1738 });1739 loader.calculate();1740 //Testing A normal module1741 Assert.isTrue((loader.sorted.indexOf("event-flick")) > -1, "Module (event-flick) not found in sorted array");1742 },1743 "Testing event-focus": function(data) {1744 var loader = new Y.Loader({1745 require: ["event-focus"],1746 ignoreRegistered: true,1747 allowRollup: false1748 });1749 loader.calculate();1750 //Testing A normal module1751 Assert.isTrue((loader.sorted.indexOf("event-focus")) > -1, "Module (event-focus) not found in sorted array");1752 },1753 "Testing event-gestures": function(data) {1754 var loader = new Y.Loader({1755 require: ["event-gestures"],1756 ignoreRegistered: true,1757 allowRollup: false1758 });1759 loader.calculate();1760 //Testing A rollup module1761 Assert.isTrue((loader.sorted.indexOf("event-flick")) > -1, "Module (event-flick) not found in sorted array");1762 Assert.isTrue((loader.sorted.indexOf("event-move")) > -1, "Module (event-move) not found in sorted array");1763 },1764 "Testing event-hover": function(data) {1765 var loader = new Y.Loader({1766 require: ["event-hover"],1767 ignoreRegistered: true,1768 allowRollup: false1769 });1770 loader.calculate();1771 //Testing A normal module1772 Assert.isTrue((loader.sorted.indexOf("event-hover")) > -1, "Module (event-hover) not found in sorted array");1773 },1774 "Testing event-key": function(data) {1775 var loader = new Y.Loader({1776 require: ["event-key"],1777 ignoreRegistered: true,1778 allowRollup: false1779 });1780 loader.calculate();1781 //Testing A normal module1782 Assert.isTrue((loader.sorted.indexOf("event-key")) > -1, "Module (event-key) not found in sorted array");1783 },1784 "Testing event-mouseenter": function(data) {1785 var loader = new Y.Loader({1786 require: ["event-mouseenter"],1787 ignoreRegistered: true,1788 allowRollup: false1789 });1790 loader.calculate();1791 //Testing A normal module1792 Assert.isTrue((loader.sorted.indexOf("event-mouseenter")) > -1, "Module (event-mouseenter) not found in sorted array");1793 },1794 "Testing event-mousewheel": function(data) {1795 var loader = new Y.Loader({1796 require: ["event-mousewheel"],1797 ignoreRegistered: true,1798 allowRollup: false1799 });1800 loader.calculate();1801 //Testing A normal module1802 Assert.isTrue((loader.sorted.indexOf("event-mousewheel")) > -1, "Module (event-mousewheel) not found in sorted array");1803 },1804 "Testing event-move": function(data) {1805 var loader = new Y.Loader({1806 require: ["event-move"],1807 ignoreRegistered: true,1808 allowRollup: false1809 });1810 loader.calculate();1811 //Testing A normal module1812 Assert.isTrue((loader.sorted.indexOf("event-move")) > -1, "Module (event-move) not found in sorted array");1813 },1814 "Testing event-outside": function(data) {1815 var loader = new Y.Loader({1816 require: ["event-outside"],1817 ignoreRegistered: true,1818 allowRollup: false1819 });1820 loader.calculate();1821 //Testing A normal module1822 Assert.isTrue((loader.sorted.indexOf("event-outside")) > -1, "Module (event-outside) not found in sorted array");1823 },1824 "Testing event-resize": function(data) {1825 var loader = new Y.Loader({1826 require: ["event-resize"],1827 ignoreRegistered: true,1828 allowRollup: false1829 });1830 loader.calculate();1831 //Testing A normal module1832 Assert.isTrue((loader.sorted.indexOf("event-resize")) > -1, "Module (event-resize) not found in sorted array");1833 },1834 "Testing event-simulate": function(data) {1835 var loader = new Y.Loader({1836 require: ["event-simulate"],1837 ignoreRegistered: true,1838 allowRollup: false1839 });1840 loader.calculate();1841 //Testing A normal module1842 Assert.isTrue((loader.sorted.indexOf("event-simulate")) > -1, "Module (event-simulate) not found in sorted array");1843 },1844 "Testing event-synthetic": function(data) {1845 var loader = new Y.Loader({1846 require: ["event-synthetic"],1847 ignoreRegistered: true,1848 allowRollup: false1849 });1850 loader.calculate();1851 //Testing A normal module1852 Assert.isTrue((loader.sorted.indexOf("event-synthetic")) > -1, "Module (event-synthetic) not found in sorted array");1853 },1854 "Testing event-tap": function(data) {1855 var loader = new Y.Loader({1856 require: ["event-tap"],1857 ignoreRegistered: true,1858 allowRollup: false1859 });1860 loader.calculate();1861 //Testing A normal module1862 Assert.isTrue((loader.sorted.indexOf("event-tap")) > -1, "Module (event-tap) not found in sorted array");1863 },1864 "Testing event-touch": function(data) {1865 var loader = new Y.Loader({1866 require: ["event-touch"],1867 ignoreRegistered: true,1868 allowRollup: false1869 });1870 loader.calculate();1871 //Testing A normal module1872 Assert.isTrue((loader.sorted.indexOf("event-touch")) > -1, "Module (event-touch) not found in sorted array");1873 },1874 "Testing event-valuechange": function(data) {1875 var loader = new Y.Loader({1876 require: ["event-valuechange"],1877 ignoreRegistered: true,1878 allowRollup: false1879 });1880 loader.calculate();1881 //Testing A normal module1882 Assert.isTrue((loader.sorted.indexOf("event-valuechange")) > -1, "Module (event-valuechange) not found in sorted array");1883 },1884 "Testing exec-command": function(data) {1885 var loader = new Y.Loader({1886 require: ["exec-command"],1887 ignoreRegistered: true,1888 allowRollup: false1889 });1890 loader.calculate();1891 //Testing A normal module1892 Assert.isTrue((loader.sorted.indexOf("exec-command")) > -1, "Module (exec-command) not found in sorted array");1893 },1894 "Testing file": function(data) {1895 var loader = new Y.Loader({1896 require: ["file"],1897 ignoreRegistered: true,1898 allowRollup: false1899 });1900 loader.calculate();1901 //Testing A normal module1902 Assert.isTrue((loader.sorted.indexOf("file")) > -1, "Module (file) not found in sorted array");1903 },1904 "Testing file-flash": function(data) {1905 var loader = new Y.Loader({1906 require: ["file-flash"],1907 ignoreRegistered: true,1908 allowRollup: false1909 });1910 loader.calculate();1911 //Testing A normal module1912 Assert.isTrue((loader.sorted.indexOf("file-flash")) > -1, "Module (file-flash) not found in sorted array");1913 },1914 "Testing file-html5": function(data) {1915 var loader = new Y.Loader({1916 require: ["file-html5"],1917 ignoreRegistered: true,1918 allowRollup: false1919 });1920 loader.calculate();1921 //Testing A normal module1922 Assert.isTrue((loader.sorted.indexOf("file-html5")) > -1, "Module (file-html5) not found in sorted array");1923 },1924 "Testing frame": function(data) {1925 var loader = new Y.Loader({1926 require: ["frame"],1927 ignoreRegistered: true,1928 allowRollup: false1929 });1930 loader.calculate();1931 //Testing A normal module1932 Assert.isTrue((loader.sorted.indexOf("frame")) > -1, "Module (frame) not found in sorted array");1933 },1934 "Testing gesture-simulate": function(data) {1935 var loader = new Y.Loader({1936 require: ["gesture-simulate"],1937 ignoreRegistered: true,1938 allowRollup: false1939 });1940 loader.calculate();1941 //Testing A normal module1942 Assert.isTrue((loader.sorted.indexOf("gesture-simulate")) > -1, "Module (gesture-simulate) not found in sorted array");1943 },1944 "Testing graphics": function(data) {1945 var loader = new Y.Loader({1946 require: ["graphics"],1947 ignoreRegistered: true,1948 allowRollup: false1949 });1950 loader.calculate();1951 //Testing A normal module1952 Assert.isTrue((loader.sorted.indexOf("graphics")) > -1, "Module (graphics) not found in sorted array");1953 },1954 "Testing graphics-canvas": function(data) {1955 var loader = new Y.Loader({1956 require: ["graphics-canvas"],1957 ignoreRegistered: true,1958 allowRollup: false1959 });1960 loader.calculate();1961 //Testing A normal module1962 Assert.isTrue((loader.sorted.indexOf("graphics-canvas")) > -1, "Module (graphics-canvas) not found in sorted array");1963 },1964 "Testing graphics-canvas-default": function(data) {1965 var loader = new Y.Loader({1966 require: ["graphics-canvas-default"],1967 ignoreRegistered: true,1968 allowRollup: false1969 });1970 loader.calculate();1971 //Testing A normal module1972 Assert.isTrue((loader.sorted.indexOf("graphics-canvas-default")) > -1, "Module (graphics-canvas-default) not found in sorted array");1973 },1974 "Testing graphics-svg": function(data) {1975 var loader = new Y.Loader({1976 require: ["graphics-svg"],1977 ignoreRegistered: true,1978 allowRollup: false1979 });1980 loader.calculate();1981 //Testing A normal module1982 Assert.isTrue((loader.sorted.indexOf("graphics-svg")) > -1, "Module (graphics-svg) not found in sorted array");1983 },1984 "Testing graphics-svg-default": function(data) {1985 var loader = new Y.Loader({1986 require: ["graphics-svg-default"],1987 ignoreRegistered: true,1988 allowRollup: false1989 });1990 loader.calculate();1991 //Testing A normal module1992 Assert.isTrue((loader.sorted.indexOf("graphics-svg-default")) > -1, "Module (graphics-svg-default) not found in sorted array");1993 },1994 "Testing graphics-vml": function(data) {1995 var loader = new Y.Loader({1996 require: ["graphics-vml"],1997 ignoreRegistered: true,1998 allowRollup: false1999 });2000 loader.calculate();2001 //Testing A normal module2002 Assert.isTrue((loader.sorted.indexOf("graphics-vml")) > -1, "Module (graphics-vml) not found in sorted array");2003 },2004 "Testing graphics-vml-default": function(data) {2005 var loader = new Y.Loader({2006 require: ["graphics-vml-default"],2007 ignoreRegistered: true,2008 allowRollup: false2009 });2010 loader.calculate();2011 //Testing A normal module2012 Assert.isTrue((loader.sorted.indexOf("graphics-vml-default")) > -1, "Module (graphics-vml-default) not found in sorted array");2013 },2014 "Testing handlebars": function(data) {2015 var loader = new Y.Loader({2016 require: ["handlebars"],2017 ignoreRegistered: true,2018 allowRollup: false2019 });2020 loader.calculate();2021 //Testing A rollup module2022 Assert.isTrue((loader.sorted.indexOf("handlebars-compiler")) > -1, "Module (handlebars-compiler) not found in sorted array");2023 },2024 "Testing handlebars-base": function(data) {2025 var loader = new Y.Loader({2026 require: ["handlebars-base"],2027 ignoreRegistered: true,2028 allowRollup: false2029 });2030 loader.calculate();2031 //Testing A normal module2032 Assert.isTrue((loader.sorted.indexOf("handlebars-base")) > -1, "Module (handlebars-base) not found in sorted array");2033 },2034 "Testing handlebars-compiler": function(data) {2035 var loader = new Y.Loader({2036 require: ["handlebars-compiler"],2037 ignoreRegistered: true,2038 allowRollup: false2039 });2040 loader.calculate();2041 //Testing A normal module2042 Assert.isTrue((loader.sorted.indexOf("handlebars-compiler")) > -1, "Module (handlebars-compiler) not found in sorted array");2043 },2044 "Testing highlight": function(data) {2045 var loader = new Y.Loader({2046 require: ["highlight"],2047 ignoreRegistered: true,2048 allowRollup: false2049 });2050 loader.calculate();2051 //Testing A rollup module2052 Assert.isTrue((loader.sorted.indexOf("highlight-base")) > -1, "Module (highlight-base) not found in sorted array");2053 Assert.isTrue((loader.sorted.indexOf("highlight-accentfold")) > -1, "Module (highlight-accentfold) not found in sorted array");2054 },2055 "Testing highlight-accentfold": function(data) {2056 var loader = new Y.Loader({2057 require: ["highlight-accentfold"],2058 ignoreRegistered: true,2059 allowRollup: false2060 });2061 loader.calculate();2062 //Testing A normal module2063 Assert.isTrue((loader.sorted.indexOf("highlight-accentfold")) > -1, "Module (highlight-accentfold) not found in sorted array");2064 },2065 "Testing highlight-base": function(data) {2066 var loader = new Y.Loader({2067 require: ["highlight-base"],2068 ignoreRegistered: true,2069 allowRollup: false2070 });2071 loader.calculate();2072 //Testing A normal module2073 Assert.isTrue((loader.sorted.indexOf("highlight-base")) > -1, "Module (highlight-base) not found in sorted array");2074 },2075 "Testing history": function(data) {2076 var loader = new Y.Loader({2077 require: ["history"],2078 ignoreRegistered: true,2079 allowRollup: false2080 });2081 loader.calculate();2082 //Testing A rollup module2083 Assert.isTrue((loader.sorted.indexOf("history-base")) > -1, "Module (history-base) not found in sorted array");2084 Assert.isTrue((loader.sorted.indexOf("history-hash")) > -1, "Module (history-hash) not found in sorted array");2085 Assert.isTrue((loader.sorted.indexOf("history-hash-ie")) > -1, "Module (history-hash-ie) not found in sorted array");2086 Assert.isTrue((loader.sorted.indexOf("history-html5")) > -1, "Module (history-html5) not found in sorted array");2087 },2088 "Testing history-base": function(data) {2089 var loader = new Y.Loader({2090 require: ["history-base"],2091 ignoreRegistered: true,2092 allowRollup: false2093 });2094 loader.calculate();2095 //Testing A normal module2096 Assert.isTrue((loader.sorted.indexOf("history-base")) > -1, "Module (history-base) not found in sorted array");2097 },2098 "Testing history-hash": function(data) {2099 var loader = new Y.Loader({2100 require: ["history-hash"],2101 ignoreRegistered: true,2102 allowRollup: false2103 });2104 loader.calculate();2105 //Testing A normal module2106 Assert.isTrue((loader.sorted.indexOf("history-hash")) > -1, "Module (history-hash) not found in sorted array");2107 },2108 "Testing history-hash-ie": function(data) {2109 var loader = new Y.Loader({2110 require: ["history-hash-ie"],2111 ignoreRegistered: true,2112 allowRollup: false2113 });2114 loader.calculate();2115 //Testing A normal module2116 Assert.isTrue((loader.sorted.indexOf("history-hash-ie")) > -1, "Module (history-hash-ie) not found in sorted array");2117 },2118 "Testing history-html5": function(data) {2119 var loader = new Y.Loader({2120 require: ["history-html5"],2121 ignoreRegistered: true,2122 allowRollup: false2123 });2124 loader.calculate();2125 //Testing A normal module2126 Assert.isTrue((loader.sorted.indexOf("history-html5")) > -1, "Module (history-html5) not found in sorted array");2127 },2128 "Testing imageloader": function(data) {2129 var loader = new Y.Loader({2130 require: ["imageloader"],2131 ignoreRegistered: true,2132 allowRollup: false2133 });2134 loader.calculate();2135 //Testing A normal module2136 Assert.isTrue((loader.sorted.indexOf("imageloader")) > -1, "Module (imageloader) not found in sorted array");2137 },2138 "Testing intl": function(data) {2139 var loader = new Y.Loader({2140 require: ["intl"],2141 ignoreRegistered: true,2142 allowRollup: false2143 });2144 loader.calculate();2145 //Testing A normal module2146 Assert.isTrue((loader.sorted.indexOf("intl")) > -1, "Module (intl) not found in sorted array");2147 },2148 "Testing io": function(data) {2149 var loader = new Y.Loader({2150 require: ["io"],2151 ignoreRegistered: true,2152 allowRollup: false2153 });2154 loader.calculate();2155 //Testing A rollup module2156 Assert.isTrue((loader.sorted.indexOf("io-base")) > -1, "Module (io-base) not found in sorted array");2157 Assert.isTrue((loader.sorted.indexOf("io-xdr")) > -1, "Module (io-xdr) not found in sorted array");2158 Assert.isTrue((loader.sorted.indexOf("io-form")) > -1, "Module (io-form) not found in sorted array");2159 Assert.isTrue((loader.sorted.indexOf("io-upload-iframe")) > -1, "Module (io-upload-iframe) not found in sorted array");2160 Assert.isTrue((loader.sorted.indexOf("io-queue")) > -1, "Module (io-queue) not found in sorted array");2161 },2162 "Testing io-base": function(data) {2163 var loader = new Y.Loader({2164 require: ["io-base"],2165 ignoreRegistered: true,2166 allowRollup: false2167 });2168 loader.calculate();2169 //Testing A normal module2170 Assert.isTrue((loader.sorted.indexOf("io-base")) > -1, "Module (io-base) not found in sorted array");2171 },2172 "Testing io-form": function(data) {2173 var loader = new Y.Loader({2174 require: ["io-form"],2175 ignoreRegistered: true,2176 allowRollup: false2177 });2178 loader.calculate();2179 //Testing A normal module2180 Assert.isTrue((loader.sorted.indexOf("io-form")) > -1, "Module (io-form) not found in sorted array");2181 },2182 "Testing io-nodejs": function(data) {2183 var loader = new Y.Loader({2184 require: ["io-nodejs"],2185 ignoreRegistered: true,2186 allowRollup: false2187 });2188 loader.calculate();2189 //Testing A normal module2190 Assert.isTrue((loader.sorted.indexOf("io-nodejs")) > -1, "Module (io-nodejs) not found in sorted array");2191 },2192 "Testing io-queue": function(data) {2193 var loader = new Y.Loader({2194 require: ["io-queue"],2195 ignoreRegistered: true,2196 allowRollup: false2197 });2198 loader.calculate();2199 //Testing A normal module2200 Assert.isTrue((loader.sorted.indexOf("io-queue")) > -1, "Module (io-queue) not found in sorted array");2201 },2202 "Testing io-upload-iframe": function(data) {2203 var loader = new Y.Loader({2204 require: ["io-upload-iframe"],2205 ignoreRegistered: true,2206 allowRollup: false2207 });2208 loader.calculate();2209 //Testing A normal module2210 Assert.isTrue((loader.sorted.indexOf("io-upload-iframe")) > -1, "Module (io-upload-iframe) not found in sorted array");2211 },2212 "Testing io-xdr": function(data) {2213 var loader = new Y.Loader({2214 require: ["io-xdr"],2215 ignoreRegistered: true,2216 allowRollup: false2217 });2218 loader.calculate();2219 //Testing A normal module2220 Assert.isTrue((loader.sorted.indexOf("io-xdr")) > -1, "Module (io-xdr) not found in sorted array");2221 },2222 "Testing json": function(data) {2223 var loader = new Y.Loader({2224 require: ["json"],2225 ignoreRegistered: true,2226 allowRollup: false2227 });2228 loader.calculate();2229 //Testing A rollup module2230 Assert.isTrue((loader.sorted.indexOf("json-parse")) > -1, "Module (json-parse) not found in sorted array");2231 Assert.isTrue((loader.sorted.indexOf("json-stringify")) > -1, "Module (json-stringify) not found in sorted array");2232 },2233 "Testing json-parse": function(data) {2234 var loader = new Y.Loader({2235 require: ["json-parse"],2236 ignoreRegistered: true,2237 allowRollup: false2238 });2239 loader.calculate();2240 //Testing A normal module2241 Assert.isTrue((loader.sorted.indexOf("json-parse")) > -1, "Module (json-parse) not found in sorted array");2242 },2243 "Testing json-stringify": function(data) {2244 var loader = new Y.Loader({2245 require: ["json-stringify"],2246 ignoreRegistered: true,2247 allowRollup: false2248 });2249 loader.calculate();2250 //Testing A normal module2251 Assert.isTrue((loader.sorted.indexOf("json-stringify")) > -1, "Module (json-stringify) not found in sorted array");2252 },2253 "Testing jsonp": function(data) {2254 var loader = new Y.Loader({2255 require: ["jsonp"],2256 ignoreRegistered: true,2257 allowRollup: false2258 });2259 loader.calculate();2260 //Testing A normal module2261 Assert.isTrue((loader.sorted.indexOf("jsonp")) > -1, "Module (jsonp) not found in sorted array");2262 },2263 "Testing jsonp-url": function(data) {2264 var loader = new Y.Loader({2265 require: ["jsonp-url"],2266 ignoreRegistered: true,2267 allowRollup: false2268 });2269 loader.calculate();2270 //Testing A normal module2271 Assert.isTrue((loader.sorted.indexOf("jsonp-url")) > -1, "Module (jsonp-url) not found in sorted array");2272 },2273 "Testing lazy-model-list": function(data) {2274 var loader = new Y.Loader({2275 require: ["lazy-model-list"],2276 ignoreRegistered: true,2277 allowRollup: false2278 });2279 loader.calculate();2280 //Testing A normal module2281 Assert.isTrue((loader.sorted.indexOf("lazy-model-list")) > -1, "Module (lazy-model-list) not found in sorted array");2282 },2283 "Testing matrix": function(data) {2284 var loader = new Y.Loader({2285 require: ["matrix"],2286 ignoreRegistered: true,2287 allowRollup: false2288 });2289 loader.calculate();2290 //Testing A normal module2291 Assert.isTrue((loader.sorted.indexOf("matrix")) > -1, "Module (matrix) not found in sorted array");2292 },2293 "Testing model": function(data) {2294 var loader = new Y.Loader({2295 require: ["model"],2296 ignoreRegistered: true,2297 allowRollup: false2298 });2299 loader.calculate();2300 //Testing A normal module2301 Assert.isTrue((loader.sorted.indexOf("model")) > -1, "Module (model) not found in sorted array");2302 },2303 "Testing model-list": function(data) {2304 var loader = new Y.Loader({2305 require: ["model-list"],2306 ignoreRegistered: true,2307 allowRollup: false2308 });2309 loader.calculate();2310 //Testing A normal module2311 Assert.isTrue((loader.sorted.indexOf("model-list")) > -1, "Module (model-list) not found in sorted array");2312 },2313 "Testing model-sync-rest": function(data) {2314 var loader = new Y.Loader({2315 require: ["model-sync-rest"],2316 ignoreRegistered: true,2317 allowRollup: false2318 });2319 loader.calculate();2320 //Testing A normal module2321 Assert.isTrue((loader.sorted.indexOf("model-sync-rest")) > -1, "Module (model-sync-rest) not found in sorted array");2322 },2323 "Testing node": function(data) {2324 var loader = new Y.Loader({2325 require: ["node"],2326 ignoreRegistered: true,2327 allowRollup: false2328 });2329 loader.calculate();2330 //Testing A rollup module2331 Assert.isTrue((loader.sorted.indexOf("node-base")) > -1, "Module (node-base) not found in sorted array");2332 Assert.isTrue((loader.sorted.indexOf("node-event-delegate")) > -1, "Module (node-event-delegate) not found in sorted array");2333 Assert.isTrue((loader.sorted.indexOf("node-pluginhost")) > -1, "Module (node-pluginhost) not found in sorted array");2334 Assert.isTrue((loader.sorted.indexOf("node-screen")) > -1, "Module (node-screen) not found in sorted array");2335 Assert.isTrue((loader.sorted.indexOf("node-style")) > -1, "Module (node-style) not found in sorted array");2336 },2337 "Testing node-base": function(data) {2338 var loader = new Y.Loader({2339 require: ["node-base"],2340 ignoreRegistered: true,2341 allowRollup: false2342 });2343 loader.calculate();2344 //Testing A normal module2345 Assert.isTrue((loader.sorted.indexOf("node-base")) > -1, "Module (node-base) not found in sorted array");2346 },2347 "Testing node-core": function(data) {2348 var loader = new Y.Loader({2349 require: ["node-core"],2350 ignoreRegistered: true,2351 allowRollup: false2352 });2353 loader.calculate();2354 //Testing A normal module2355 Assert.isTrue((loader.sorted.indexOf("node-core")) > -1, "Module (node-core) not found in sorted array");2356 },2357 "Testing node-deprecated": function(data) {2358 var loader = new Y.Loader({2359 require: ["node-deprecated"],2360 ignoreRegistered: true,2361 allowRollup: false2362 });2363 loader.calculate();2364 //Testing A normal module2365 Assert.isTrue((loader.sorted.indexOf("node-deprecated")) > -1, "Module (node-deprecated) not found in sorted array");2366 },2367 "Testing node-event-delegate": function(data) {2368 var loader = new Y.Loader({2369 require: ["node-event-delegate"],2370 ignoreRegistered: true,2371 allowRollup: false2372 });2373 loader.calculate();2374 //Testing A normal module2375 Assert.isTrue((loader.sorted.indexOf("node-event-delegate")) > -1, "Module (node-event-delegate) not found in sorted array");2376 },2377 "Testing node-event-html5": function(data) {2378 var loader = new Y.Loader({2379 require: ["node-event-html5"],2380 ignoreRegistered: true,2381 allowRollup: false2382 });2383 loader.calculate();2384 //Testing A normal module2385 Assert.isTrue((loader.sorted.indexOf("node-event-html5")) > -1, "Module (node-event-html5) not found in sorted array");2386 },2387 "Testing node-event-simulate": function(data) {2388 var loader = new Y.Loader({2389 require: ["node-event-simulate"],2390 ignoreRegistered: true,2391 allowRollup: false2392 });2393 loader.calculate();2394 //Testing A normal module2395 Assert.isTrue((loader.sorted.indexOf("node-event-simulate")) > -1, "Module (node-event-simulate) not found in sorted array");2396 },2397 "Testing node-flick": function(data) {2398 var loader = new Y.Loader({2399 require: ["node-flick"],2400 ignoreRegistered: true,2401 allowRollup: false2402 });2403 loader.calculate();2404 //Testing A normal module2405 Assert.isTrue((loader.sorted.indexOf("node-flick")) > -1, "Module (node-flick) not found in sorted array");2406 },2407 "Testing node-focusmanager": function(data) {2408 var loader = new Y.Loader({2409 require: ["node-focusmanager"],2410 ignoreRegistered: true,2411 allowRollup: false2412 });2413 loader.calculate();2414 //Testing A normal module2415 Assert.isTrue((loader.sorted.indexOf("node-focusmanager")) > -1, "Module (node-focusmanager) not found in sorted array");2416 },2417 "Testing node-load": function(data) {2418 var loader = new Y.Loader({2419 require: ["node-load"],2420 ignoreRegistered: true,2421 allowRollup: false2422 });2423 loader.calculate();2424 //Testing A normal module2425 Assert.isTrue((loader.sorted.indexOf("node-load")) > -1, "Module (node-load) not found in sorted array");2426 },2427 "Testing node-menunav": function(data) {2428 var loader = new Y.Loader({2429 require: ["node-menunav"],2430 ignoreRegistered: true,2431 allowRollup: false2432 });2433 loader.calculate();2434 //Testing A normal module2435 Assert.isTrue((loader.sorted.indexOf("node-menunav")) > -1, "Module (node-menunav) not found in sorted array");2436 },2437 "Testing node-pluginhost": function(data) {2438 var loader = new Y.Loader({2439 require: ["node-pluginhost"],2440 ignoreRegistered: true,2441 allowRollup: false2442 });2443 loader.calculate();2444 //Testing A normal module2445 Assert.isTrue((loader.sorted.indexOf("node-pluginhost")) > -1, "Module (node-pluginhost) not found in sorted array");2446 },2447 "Testing node-screen": function(data) {2448 var loader = new Y.Loader({2449 require: ["node-screen"],2450 ignoreRegistered: true,2451 allowRollup: false2452 });2453 loader.calculate();2454 //Testing A normal module2455 Assert.isTrue((loader.sorted.indexOf("node-screen")) > -1, "Module (node-screen) not found in sorted array");2456 },2457 "Testing node-scroll-info": function(data) {2458 var loader = new Y.Loader({2459 require: ["node-scroll-info"],2460 ignoreRegistered: true,2461 allowRollup: false2462 });2463 loader.calculate();2464 //Testing A normal module2465 Assert.isTrue((loader.sorted.indexOf("node-scroll-info")) > -1, "Module (node-scroll-info) not found in sorted array");2466 },2467 "Testing node-style": function(data) {2468 var loader = new Y.Loader({2469 require: ["node-style"],2470 ignoreRegistered: true,2471 allowRollup: false2472 });2473 loader.calculate();2474 //Testing A normal module2475 Assert.isTrue((loader.sorted.indexOf("node-style")) > -1, "Module (node-style) not found in sorted array");2476 },2477 "Testing oop": function(data) {2478 var loader = new Y.Loader({2479 require: ["oop"],2480 ignoreRegistered: true,2481 allowRollup: false2482 });2483 loader.calculate();2484 //Testing A normal module2485 Assert.isTrue((loader.sorted.indexOf("oop")) > -1, "Module (oop) not found in sorted array");2486 },2487 "Testing overlay": function(data) {2488 var loader = new Y.Loader({2489 require: ["overlay"],2490 ignoreRegistered: true,2491 allowRollup: false2492 });2493 loader.calculate();2494 //Testing A normal module2495 Assert.isTrue((loader.sorted.indexOf("overlay")) > -1, "Module (overlay) not found in sorted array");2496 },2497 "Testing panel": function(data) {2498 var loader = new Y.Loader({2499 require: ["panel"],2500 ignoreRegistered: true,2501 allowRollup: false2502 });2503 loader.calculate();2504 //Testing A normal module2505 Assert.isTrue((loader.sorted.indexOf("panel")) > -1, "Module (panel) not found in sorted array");2506 },2507 "Testing parallel": function(data) {2508 var loader = new Y.Loader({2509 require: ["parallel"],2510 ignoreRegistered: true,2511 allowRollup: false2512 });2513 loader.calculate();2514 //Testing A normal module2515 Assert.isTrue((loader.sorted.indexOf("parallel")) > -1, "Module (parallel) not found in sorted array");2516 },2517 "Testing pjax": function(data) {2518 var loader = new Y.Loader({2519 require: ["pjax"],2520 ignoreRegistered: true,2521 allowRollup: false2522 });2523 loader.calculate();2524 //Testing A normal module2525 Assert.isTrue((loader.sorted.indexOf("pjax")) > -1, "Module (pjax) not found in sorted array");2526 },2527 "Testing pjax-base": function(data) {2528 var loader = new Y.Loader({2529 require: ["pjax-base"],2530 ignoreRegistered: true,2531 allowRollup: false2532 });2533 loader.calculate();2534 //Testing A normal module2535 Assert.isTrue((loader.sorted.indexOf("pjax-base")) > -1, "Module (pjax-base) not found in sorted array");2536 },2537 "Testing pjax-content": function(data) {2538 var loader = new Y.Loader({2539 require: ["pjax-content"],2540 ignoreRegistered: true,2541 allowRollup: false2542 });2543 loader.calculate();2544 //Testing A normal module2545 Assert.isTrue((loader.sorted.indexOf("pjax-content")) > -1, "Module (pjax-content) not found in sorted array");2546 },2547 "Testing pjax-plugin": function(data) {2548 var loader = new Y.Loader({2549 require: ["pjax-plugin"],2550 ignoreRegistered: true,2551 allowRollup: false2552 });2553 loader.calculate();2554 //Testing A normal module2555 Assert.isTrue((loader.sorted.indexOf("pjax-plugin")) > -1, "Module (pjax-plugin) not found in sorted array");2556 },2557 "Testing plugin": function(data) {2558 var loader = new Y.Loader({2559 require: ["plugin"],2560 ignoreRegistered: true,2561 allowRollup: false2562 });2563 loader.calculate();2564 //Testing A normal module2565 Assert.isTrue((loader.sorted.indexOf("plugin")) > -1, "Module (plugin) not found in sorted array");2566 },2567 "Testing pluginhost": function(data) {2568 var loader = new Y.Loader({2569 require: ["pluginhost"],2570 ignoreRegistered: true,2571 allowRollup: false2572 });2573 loader.calculate();2574 //Testing A rollup module2575 Assert.isTrue((loader.sorted.indexOf("pluginhost-base")) > -1, "Module (pluginhost-base) not found in sorted array");2576 Assert.isTrue((loader.sorted.indexOf("pluginhost-config")) > -1, "Module (pluginhost-config) not found in sorted array");2577 },2578 "Testing pluginhost-base": function(data) {2579 var loader = new Y.Loader({2580 require: ["pluginhost-base"],2581 ignoreRegistered: true,2582 allowRollup: false2583 });2584 loader.calculate();2585 //Testing A normal module2586 Assert.isTrue((loader.sorted.indexOf("pluginhost-base")) > -1, "Module (pluginhost-base) not found in sorted array");2587 },2588 "Testing pluginhost-config": function(data) {2589 var loader = new Y.Loader({2590 require: ["pluginhost-config"],2591 ignoreRegistered: true,2592 allowRollup: false2593 });2594 loader.calculate();2595 //Testing A normal module2596 Assert.isTrue((loader.sorted.indexOf("pluginhost-config")) > -1, "Module (pluginhost-config) not found in sorted array");2597 },2598 "Testing profiler": function(data) {2599 var loader = new Y.Loader({2600 require: ["profiler"],2601 ignoreRegistered: true,2602 allowRollup: false2603 });2604 loader.calculate();2605 //Testing A normal module2606 Assert.isTrue((loader.sorted.indexOf("profiler")) > -1, "Module (profiler) not found in sorted array");2607 },2608 "Testing querystring": function(data) {2609 var loader = new Y.Loader({2610 require: ["querystring"],2611 ignoreRegistered: true,2612 allowRollup: false2613 });2614 loader.calculate();2615 //Testing A rollup module2616 Assert.isTrue((loader.sorted.indexOf("querystring-parse")) > -1, "Module (querystring-parse) not found in sorted array");2617 Assert.isTrue((loader.sorted.indexOf("querystring-stringify")) > -1, "Module (querystring-stringify) not found in sorted array");2618 },2619 "Testing querystring-parse": function(data) {2620 var loader = new Y.Loader({2621 require: ["querystring-parse"],2622 ignoreRegistered: true,2623 allowRollup: false2624 });2625 loader.calculate();2626 //Testing A normal module2627 Assert.isTrue((loader.sorted.indexOf("querystring-parse")) > -1, "Module (querystring-parse) not found in sorted array");2628 },2629 "Testing querystring-parse-simple": function(data) {2630 var loader = new Y.Loader({2631 require: ["querystring-parse-simple"],2632 ignoreRegistered: true,2633 allowRollup: false2634 });2635 loader.calculate();2636 //Testing A normal module2637 Assert.isTrue((loader.sorted.indexOf("querystring-parse-simple")) > -1, "Module (querystring-parse-simple) not found in sorted array");2638 },2639 "Testing querystring-stringify": function(data) {2640 var loader = new Y.Loader({2641 require: ["querystring-stringify"],2642 ignoreRegistered: true,2643 allowRollup: false2644 });2645 loader.calculate();2646 //Testing A normal module2647 Assert.isTrue((loader.sorted.indexOf("querystring-stringify")) > -1, "Module (querystring-stringify) not found in sorted array");2648 },2649 "Testing querystring-stringify-simple": function(data) {2650 var loader = new Y.Loader({2651 require: ["querystring-stringify-simple"],2652 ignoreRegistered: true,2653 allowRollup: false2654 });2655 loader.calculate();2656 //Testing A normal module2657 Assert.isTrue((loader.sorted.indexOf("querystring-stringify-simple")) > -1, "Module (querystring-stringify-simple) not found in sorted array");2658 },2659 "Testing queue-promote": function(data) {2660 var loader = new Y.Loader({2661 require: ["queue-promote"],2662 ignoreRegistered: true,2663 allowRollup: false2664 });2665 loader.calculate();2666 //Testing A normal module2667 Assert.isTrue((loader.sorted.indexOf("queue-promote")) > -1, "Module (queue-promote) not found in sorted array");2668 },2669 "Testing range-slider": function(data) {2670 var loader = new Y.Loader({2671 require: ["range-slider"],2672 ignoreRegistered: true,2673 allowRollup: false2674 });2675 loader.calculate();2676 //Testing A normal module2677 Assert.isTrue((loader.sorted.indexOf("range-slider")) > -1, "Module (range-slider) not found in sorted array");2678 },2679 "Testing recordset": function(data) {2680 var loader = new Y.Loader({2681 require: ["recordset"],2682 ignoreRegistered: true,2683 allowRollup: false2684 });2685 loader.calculate();2686 //Testing A rollup module2687 Assert.isTrue((loader.sorted.indexOf("recordset-base")) > -1, "Module (recordset-base) not found in sorted array");2688 Assert.isTrue((loader.sorted.indexOf("recordset-sort")) > -1, "Module (recordset-sort) not found in sorted array");2689 Assert.isTrue((loader.sorted.indexOf("recordset-filter")) > -1, "Module (recordset-filter) not found in sorted array");2690 Assert.isTrue((loader.sorted.indexOf("recordset-indexer")) > -1, "Module (recordset-indexer) not found in sorted array");2691 },2692 "Testing recordset-base": function(data) {2693 var loader = new Y.Loader({2694 require: ["recordset-base"],2695 ignoreRegistered: true,2696 allowRollup: false2697 });2698 loader.calculate();2699 //Testing A normal module2700 Assert.isTrue((loader.sorted.indexOf("recordset-base")) > -1, "Module (recordset-base) not found in sorted array");2701 },2702 "Testing recordset-filter": function(data) {2703 var loader = new Y.Loader({2704 require: ["recordset-filter"],2705 ignoreRegistered: true,2706 allowRollup: false2707 });2708 loader.calculate();2709 //Testing A normal module2710 Assert.isTrue((loader.sorted.indexOf("recordset-filter")) > -1, "Module (recordset-filter) not found in sorted array");2711 },2712 "Testing recordset-indexer": function(data) {2713 var loader = new Y.Loader({2714 require: ["recordset-indexer"],2715 ignoreRegistered: true,2716 allowRollup: false2717 });2718 loader.calculate();2719 //Testing A normal module2720 Assert.isTrue((loader.sorted.indexOf("recordset-indexer")) > -1, "Module (recordset-indexer) not found in sorted array");2721 },2722 "Testing recordset-sort": function(data) {2723 var loader = new Y.Loader({2724 require: ["recordset-sort"],2725 ignoreRegistered: true,2726 allowRollup: false2727 });2728 loader.calculate();2729 //Testing A normal module2730 Assert.isTrue((loader.sorted.indexOf("recordset-sort")) > -1, "Module (recordset-sort) not found in sorted array");2731 },2732 "Testing resize": function(data) {2733 var loader = new Y.Loader({2734 require: ["resize"],2735 ignoreRegistered: true,2736 allowRollup: false2737 });2738 loader.calculate();2739 //Testing A rollup module2740 Assert.isTrue((loader.sorted.indexOf("resize-base")) > -1, "Module (resize-base) not found in sorted array");2741 Assert.isTrue((loader.sorted.indexOf("resize-proxy")) > -1, "Module (resize-proxy) not found in sorted array");2742 Assert.isTrue((loader.sorted.indexOf("resize-constrain")) > -1, "Module (resize-constrain) not found in sorted array");2743 },2744 "Testing resize-base": function(data) {2745 var loader = new Y.Loader({2746 require: ["resize-base"],2747 ignoreRegistered: true,2748 allowRollup: false2749 });2750 loader.calculate();2751 //Testing A normal module2752 Assert.isTrue((loader.sorted.indexOf("resize-base")) > -1, "Module (resize-base) not found in sorted array");2753 },2754 "Testing resize-constrain": function(data) {2755 var loader = new Y.Loader({2756 require: ["resize-constrain"],2757 ignoreRegistered: true,2758 allowRollup: false2759 });2760 loader.calculate();2761 //Testing A normal module2762 Assert.isTrue((loader.sorted.indexOf("resize-constrain")) > -1, "Module (resize-constrain) not found in sorted array");2763 },2764 "Testing resize-plugin": function(data) {2765 var loader = new Y.Loader({2766 require: ["resize-plugin"],2767 ignoreRegistered: true,2768 allowRollup: false2769 });2770 loader.calculate();2771 //Testing A normal module2772 Assert.isTrue((loader.sorted.indexOf("resize-plugin")) > -1, "Module (resize-plugin) not found in sorted array");2773 },2774 "Testing resize-proxy": function(data) {2775 var loader = new Y.Loader({2776 require: ["resize-proxy"],2777 ignoreRegistered: true,2778 allowRollup: false2779 });2780 loader.calculate();2781 //Testing A normal module2782 Assert.isTrue((loader.sorted.indexOf("resize-proxy")) > -1, "Module (resize-proxy) not found in sorted array");2783 },2784 "Testing router": function(data) {2785 var loader = new Y.Loader({2786 require: ["router"],2787 ignoreRegistered: true,2788 allowRollup: false2789 });2790 loader.calculate();2791 //Testing A normal module2792 Assert.isTrue((loader.sorted.indexOf("router")) > -1, "Module (router) not found in sorted array");2793 },2794 "Testing scrollview": function(data) {2795 var loader = new Y.Loader({2796 require: ["scrollview"],2797 ignoreRegistered: true,2798 allowRollup: false2799 });2800 loader.calculate();2801 //Testing A normal module2802 Assert.isTrue((loader.sorted.indexOf("scrollview")) > -1, "Module (scrollview) not found in sorted array");2803 },2804 "Testing scrollview-base": function(data) {2805 var loader = new Y.Loader({2806 require: ["scrollview-base"],2807 ignoreRegistered: true,2808 allowRollup: false2809 });2810 loader.calculate();2811 //Testing A normal module2812 Assert.isTrue((loader.sorted.indexOf("scrollview-base")) > -1, "Module (scrollview-base) not found in sorted array");2813 },2814 "Testing scrollview-base-ie": function(data) {2815 var loader = new Y.Loader({2816 require: ["scrollview-base-ie"],2817 ignoreRegistered: true,2818 allowRollup: false2819 });2820 loader.calculate();2821 //Testing A normal module2822 Assert.isTrue((loader.sorted.indexOf("scrollview-base-ie")) > -1, "Module (scrollview-base-ie) not found in sorted array");2823 },2824 "Testing scrollview-list": function(data) {2825 var loader = new Y.Loader({2826 require: ["scrollview-list"],2827 ignoreRegistered: true,2828 allowRollup: false2829 });2830 loader.calculate();2831 //Testing A normal module2832 Assert.isTrue((loader.sorted.indexOf("scrollview-list")) > -1, "Module (scrollview-list) not found in sorted array");2833 },2834 "Testing scrollview-paginator": function(data) {2835 var loader = new Y.Loader({2836 require: ["scrollview-paginator"],2837 ignoreRegistered: true,2838 allowRollup: false2839 });2840 loader.calculate();2841 //Testing A normal module2842 Assert.isTrue((loader.sorted.indexOf("scrollview-paginator")) > -1, "Module (scrollview-paginator) not found in sorted array");2843 },2844 "Testing scrollview-scrollbars": function(data) {2845 var loader = new Y.Loader({2846 require: ["scrollview-scrollbars"],2847 ignoreRegistered: true,2848 allowRollup: false2849 });2850 loader.calculate();2851 //Testing A normal module2852 Assert.isTrue((loader.sorted.indexOf("scrollview-scrollbars")) > -1, "Module (scrollview-scrollbars) not found in sorted array");2853 },2854 "Testing selector": function(data) {2855 var loader = new Y.Loader({2856 require: ["selector"],2857 ignoreRegistered: true,2858 allowRollup: false2859 });2860 loader.calculate();2861 //Testing A normal module2862 Assert.isTrue((loader.sorted.indexOf("selector")) > -1, "Module (selector) not found in sorted array");2863 },2864 "Testing selector-native": function(data) {2865 var loader = new Y.Loader({2866 require: ["selector-native"],2867 ignoreRegistered: true,2868 allowRollup: false2869 });2870 loader.calculate();2871 //Testing A normal module2872 Assert.isTrue((loader.sorted.indexOf("selector-native")) > -1, "Module (selector-native) not found in sorted array");2873 },2874 "Testing shim-plugin": function(data) {2875 var loader = new Y.Loader({2876 require: ["shim-plugin"],2877 ignoreRegistered: true,2878 allowRollup: false2879 });2880 loader.calculate();2881 //Testing A normal module2882 Assert.isTrue((loader.sorted.indexOf("shim-plugin")) > -1, "Module (shim-plugin) not found in sorted array");2883 },2884 "Testing slider": function(data) {2885 var loader = new Y.Loader({2886 require: ["slider"],2887 ignoreRegistered: true,2888 allowRollup: false2889 });2890 loader.calculate();2891 //Testing A rollup module2892 Assert.isTrue((loader.sorted.indexOf("slider-base")) > -1, "Module (slider-base) not found in sorted array");2893 Assert.isTrue((loader.sorted.indexOf("slider-value-range")) > -1, "Module (slider-value-range) not found in sorted array");2894 Assert.isTrue((loader.sorted.indexOf("clickable-rail")) > -1, "Module (clickable-rail) not found in sorted array");2895 Assert.isTrue((loader.sorted.indexOf("range-slider")) > -1, "Module (range-slider) not found in sorted array");2896 },2897 "Testing slider-base": function(data) {2898 var loader = new Y.Loader({2899 require: ["slider-base"],2900 ignoreRegistered: true,2901 allowRollup: false2902 });2903 loader.calculate();2904 //Testing A normal module2905 Assert.isTrue((loader.sorted.indexOf("slider-base")) > -1, "Module (slider-base) not found in sorted array");2906 },2907 "Testing slider-value-range": function(data) {2908 var loader = new Y.Loader({2909 require: ["slider-value-range"],2910 ignoreRegistered: true,2911 allowRollup: false2912 });2913 loader.calculate();2914 //Testing A normal module2915 Assert.isTrue((loader.sorted.indexOf("slider-value-range")) > -1, "Module (slider-value-range) not found in sorted array");2916 },2917 "Testing sortable": function(data) {2918 var loader = new Y.Loader({2919 require: ["sortable"],2920 ignoreRegistered: true,2921 allowRollup: false2922 });2923 loader.calculate();2924 //Testing A normal module2925 Assert.isTrue((loader.sorted.indexOf("sortable")) > -1, "Module (sortable) not found in sorted array");2926 },2927 "Testing sortable-scroll": function(data) {2928 var loader = new Y.Loader({2929 require: ["sortable-scroll"],2930 ignoreRegistered: true,2931 allowRollup: false2932 });2933 loader.calculate();2934 //Testing A normal module2935 Assert.isTrue((loader.sorted.indexOf("sortable-scroll")) > -1, "Module (sortable-scroll) not found in sorted array");2936 },2937 "Testing stylesheet": function(data) {2938 var loader = new Y.Loader({2939 require: ["stylesheet"],2940 ignoreRegistered: true,2941 allowRollup: false2942 });2943 loader.calculate();2944 //Testing A normal module2945 Assert.isTrue((loader.sorted.indexOf("stylesheet")) > -1, "Module (stylesheet) not found in sorted array");2946 },2947 "Testing substitute": function(data) {2948 var loader = new Y.Loader({2949 require: ["substitute"],2950 ignoreRegistered: true,2951 allowRollup: false2952 });2953 loader.calculate();2954 //Testing A normal module2955 Assert.isTrue((loader.sorted.indexOf("substitute")) > -1, "Module (substitute) not found in sorted array");2956 },2957 "Testing swf": function(data) {2958 var loader = new Y.Loader({2959 require: ["swf"],2960 ignoreRegistered: true,2961 allowRollup: false2962 });2963 loader.calculate();2964 //Testing A normal module2965 Assert.isTrue((loader.sorted.indexOf("swf")) > -1, "Module (swf) not found in sorted array");2966 },2967 "Testing swfdetect": function(data) {2968 var loader = new Y.Loader({2969 require: ["swfdetect"],2970 ignoreRegistered: true,2971 allowRollup: false2972 });2973 loader.calculate();2974 //Testing A normal module2975 Assert.isTrue((loader.sorted.indexOf("swfdetect")) > -1, "Module (swfdetect) not found in sorted array");2976 },2977 "Testing tabview": function(data) {2978 var loader = new Y.Loader({2979 require: ["tabview"],2980 ignoreRegistered: true,2981 allowRollup: false2982 });2983 loader.calculate();2984 //Testing A normal module2985 Assert.isTrue((loader.sorted.indexOf("tabview")) > -1, "Module (tabview) not found in sorted array");2986 },2987 "Testing tabview-base": function(data) {2988 var loader = new Y.Loader({2989 require: ["tabview-base"],2990 ignoreRegistered: true,2991 allowRollup: false2992 });2993 loader.calculate();2994 //Testing A normal module2995 Assert.isTrue((loader.sorted.indexOf("tabview-base")) > -1, "Module (tabview-base) not found in sorted array");2996 },2997 "Testing tabview-plugin": function(data) {2998 var loader = new Y.Loader({2999 require: ["tabview-plugin"],3000 ignoreRegistered: true,3001 allowRollup: false3002 });3003 loader.calculate();3004 //Testing A normal module3005 Assert.isTrue((loader.sorted.indexOf("tabview-plugin")) > -1, "Module (tabview-plugin) not found in sorted array");3006 },3007 "Testing template": function(data) {3008 var loader = new Y.Loader({3009 require: ["template"],3010 ignoreRegistered: true,3011 allowRollup: false3012 });3013 loader.calculate();3014 //Testing A rollup module3015 Assert.isTrue((loader.sorted.indexOf("template-base")) > -1, "Module (template-base) not found in sorted array");3016 Assert.isTrue((loader.sorted.indexOf("template-micro")) > -1, "Module (template-micro) not found in sorted array");3017 },3018 "Testing template-base": function(data) {3019 var loader = new Y.Loader({3020 require: ["template-base"],3021 ignoreRegistered: true,3022 allowRollup: false3023 });3024 loader.calculate();3025 //Testing A normal module3026 Assert.isTrue((loader.sorted.indexOf("template-base")) > -1, "Module (template-base) not found in sorted array");3027 },3028 "Testing template-micro": function(data) {3029 var loader = new Y.Loader({3030 require: ["template-micro"],3031 ignoreRegistered: true,3032 allowRollup: false3033 });3034 loader.calculate();3035 //Testing A normal module3036 Assert.isTrue((loader.sorted.indexOf("template-micro")) > -1, "Module (template-micro) not found in sorted array");3037 },3038 "Testing test": function(data) {3039 var loader = new Y.Loader({3040 require: ["test"],3041 ignoreRegistered: true,3042 allowRollup: false3043 });3044 loader.calculate();3045 //Testing A normal module3046 Assert.isTrue((loader.sorted.indexOf("test")) > -1, "Module (test) not found in sorted array");3047 },3048 "Testing test-console": function(data) {3049 var loader = new Y.Loader({3050 require: ["test-console"],3051 ignoreRegistered: true,3052 allowRollup: false3053 });3054 loader.calculate();3055 //Testing A normal module3056 Assert.isTrue((loader.sorted.indexOf("test-console")) > -1, "Module (test-console) not found in sorted array");3057 },3058 "Testing text": function(data) {3059 var loader = new Y.Loader({3060 require: ["text"],3061 ignoreRegistered: true,3062 allowRollup: false3063 });3064 loader.calculate();3065 //Testing A rollup module3066 Assert.isTrue((loader.sorted.indexOf("text-accentfold")) > -1, "Module (text-accentfold) not found in sorted array");3067 Assert.isTrue((loader.sorted.indexOf("text-wordbreak")) > -1, "Module (text-wordbreak) not found in sorted array");3068 },3069 "Testing text-accentfold": function(data) {3070 var loader = new Y.Loader({3071 require: ["text-accentfold"],3072 ignoreRegistered: true,3073 allowRollup: false3074 });3075 loader.calculate();3076 //Testing A normal module3077 Assert.isTrue((loader.sorted.indexOf("text-accentfold")) > -1, "Module (text-accentfold) not found in sorted array");3078 },3079 "Testing text-data-accentfold": function(data) {3080 var loader = new Y.Loader({3081 require: ["text-data-accentfold"],3082 ignoreRegistered: true,3083 allowRollup: false3084 });3085 loader.calculate();3086 //Testing A normal module3087 Assert.isTrue((loader.sorted.indexOf("text-data-accentfold")) > -1, "Module (text-data-accentfold) not found in sorted array");3088 },3089 "Testing text-data-wordbreak": function(data) {3090 var loader = new Y.Loader({3091 require: ["text-data-wordbreak"],3092 ignoreRegistered: true,3093 allowRollup: false3094 });3095 loader.calculate();3096 //Testing A normal module3097 Assert.isTrue((loader.sorted.indexOf("text-data-wordbreak")) > -1, "Module (text-data-wordbreak) not found in sorted array");3098 },3099 "Testing text-wordbreak": function(data) {3100 var loader = new Y.Loader({3101 require: ["text-wordbreak"],3102 ignoreRegistered: true,3103 allowRollup: false3104 });3105 loader.calculate();3106 //Testing A normal module3107 Assert.isTrue((loader.sorted.indexOf("text-wordbreak")) > -1, "Module (text-wordbreak) not found in sorted array");3108 },3109 "Testing transition": function(data) {3110 var loader = new Y.Loader({3111 require: ["transition"],3112 ignoreRegistered: true,3113 allowRollup: false3114 });3115 loader.calculate();3116 //Testing A normal module3117 Assert.isTrue((loader.sorted.indexOf("transition")) > -1, "Module (transition) not found in sorted array");3118 },3119 "Testing transition-timer": function(data) {3120 var loader = new Y.Loader({3121 require: ["transition-timer"],3122 ignoreRegistered: true,3123 allowRollup: false3124 });3125 loader.calculate();3126 //Testing A normal module3127 Assert.isTrue((loader.sorted.indexOf("transition-timer")) > -1, "Module (transition-timer) not found in sorted array");3128 },3129 "Testing uploader": function(data) {3130 var loader = new Y.Loader({3131 require: ["uploader"],3132 ignoreRegistered: true,3133 allowRollup: false3134 });3135 loader.calculate();3136 //Testing A normal module3137 Assert.isTrue((loader.sorted.indexOf("uploader")) > -1, "Module (uploader) not found in sorted array");3138 },3139 "Testing uploader-deprecated": function(data) {3140 var loader = new Y.Loader({3141 require: ["uploader-deprecated"],3142 ignoreRegistered: true,3143 allowRollup: false3144 });3145 loader.calculate();3146 //Testing A normal module3147 Assert.isTrue((loader.sorted.indexOf("uploader-deprecated")) > -1, "Module (uploader-deprecated) not found in sorted array");3148 },3149 "Testing uploader-flash": function(data) {3150 var loader = new Y.Loader({3151 require: ["uploader-flash"],3152 ignoreRegistered: true,3153 allowRollup: false3154 });3155 loader.calculate();3156 //Testing A normal module3157 Assert.isTrue((loader.sorted.indexOf("uploader-flash")) > -1, "Module (uploader-flash) not found in sorted array");3158 },3159 "Testing uploader-html5": function(data) {3160 var loader = new Y.Loader({3161 require: ["uploader-html5"],3162 ignoreRegistered: true,3163 allowRollup: false3164 });3165 loader.calculate();3166 //Testing A normal module3167 Assert.isTrue((loader.sorted.indexOf("uploader-html5")) > -1, "Module (uploader-html5) not found in sorted array");3168 },3169 "Testing uploader-queue": function(data) {3170 var loader = new Y.Loader({3171 require: ["uploader-queue"],3172 ignoreRegistered: true,3173 allowRollup: false3174 });3175 loader.calculate();3176 //Testing A normal module3177 Assert.isTrue((loader.sorted.indexOf("uploader-queue")) > -1, "Module (uploader-queue) not found in sorted array");3178 },3179 "Testing view": function(data) {3180 var loader = new Y.Loader({3181 require: ["view"],3182 ignoreRegistered: true,3183 allowRollup: false3184 });3185 loader.calculate();3186 //Testing A normal module3187 Assert.isTrue((loader.sorted.indexOf("view")) > -1, "Module (view) not found in sorted array");3188 },3189 "Testing view-node-map": function(data) {3190 var loader = new Y.Loader({3191 require: ["view-node-map"],3192 ignoreRegistered: true,3193 allowRollup: false3194 });3195 loader.calculate();3196 //Testing A normal module3197 Assert.isTrue((loader.sorted.indexOf("view-node-map")) > -1, "Module (view-node-map) not found in sorted array");3198 },3199 "Testing widget": function(data) {3200 var loader = new Y.Loader({3201 require: ["widget"],3202 ignoreRegistered: true,3203 allowRollup: false3204 });3205 loader.calculate();3206 //Testing A rollup module3207 Assert.isTrue((loader.sorted.indexOf("widget-base")) > -1, "Module (widget-base) not found in sorted array");3208 Assert.isTrue((loader.sorted.indexOf("widget-htmlparser")) > -1, "Module (widget-htmlparser) not found in sorted array");3209 Assert.isTrue((loader.sorted.indexOf("widget-skin")) > -1, "Module (widget-skin) not found in sorted array");3210 Assert.isTrue((loader.sorted.indexOf("widget-uievents")) > -1, "Module (widget-uievents) not found in sorted array");3211 },3212 "Testing widget-anim": function(data) {3213 var loader = new Y.Loader({3214 require: ["widget-anim"],3215 ignoreRegistered: true,3216 allowRollup: false3217 });3218 loader.calculate();3219 //Testing A normal module3220 Assert.isTrue((loader.sorted.indexOf("widget-anim")) > -1, "Module (widget-anim) not found in sorted array");3221 },3222 "Testing widget-autohide": function(data) {3223 var loader = new Y.Loader({3224 require: ["widget-autohide"],3225 ignoreRegistered: true,3226 allowRollup: false3227 });3228 loader.calculate();3229 //Testing A normal module3230 Assert.isTrue((loader.sorted.indexOf("widget-autohide")) > -1, "Module (widget-autohide) not found in sorted array");3231 },3232 "Testing widget-base": function(data) {3233 var loader = new Y.Loader({3234 require: ["widget-base"],3235 ignoreRegistered: true,3236 allowRollup: false3237 });3238 loader.calculate();3239 //Testing A normal module3240 Assert.isTrue((loader.sorted.indexOf("widget-base")) > -1, "Module (widget-base) not found in sorted array");3241 },3242 "Testing widget-base-ie": function(data) {3243 var loader = new Y.Loader({3244 require: ["widget-base-ie"],3245 ignoreRegistered: true,3246 allowRollup: false3247 });3248 loader.calculate();3249 //Testing A normal module3250 Assert.isTrue((loader.sorted.indexOf("widget-base-ie")) > -1, "Module (widget-base-ie) not found in sorted array");3251 },3252 "Testing widget-buttons": function(data) {3253 var loader = new Y.Loader({3254 require: ["widget-buttons"],3255 ignoreRegistered: true,3256 allowRollup: false3257 });3258 loader.calculate();3259 //Testing A normal module3260 Assert.isTrue((loader.sorted.indexOf("widget-buttons")) > -1, "Module (widget-buttons) not found in sorted array");3261 },3262 "Testing widget-child": function(data) {3263 var loader = new Y.Loader({3264 require: ["widget-child"],3265 ignoreRegistered: true,3266 allowRollup: false3267 });3268 loader.calculate();3269 //Testing A normal module3270 Assert.isTrue((loader.sorted.indexOf("widget-child")) > -1, "Module (widget-child) not found in sorted array");3271 },3272 "Testing widget-htmlparser": function(data) {3273 var loader = new Y.Loader({3274 require: ["widget-htmlparser"],3275 ignoreRegistered: true,3276 allowRollup: false3277 });3278 loader.calculate();3279 //Testing A normal module3280 Assert.isTrue((loader.sorted.indexOf("widget-htmlparser")) > -1, "Module (widget-htmlparser) not found in sorted array");3281 },3282 "Testing widget-locale": function(data) {3283 var loader = new Y.Loader({3284 require: ["widget-locale"],3285 ignoreRegistered: true,3286 allowRollup: false3287 });3288 loader.calculate();3289 //Testing A normal module3290 Assert.isTrue((loader.sorted.indexOf("widget-locale")) > -1, "Module (widget-locale) not found in sorted array");3291 },3292 "Testing widget-modality": function(data) {3293 var loader = new Y.Loader({3294 require: ["widget-modality"],3295 ignoreRegistered: true,3296 allowRollup: false3297 });3298 loader.calculate();3299 //Testing A normal module3300 Assert.isTrue((loader.sorted.indexOf("widget-modality")) > -1, "Module (widget-modality) not found in sorted array");3301 },3302 "Testing widget-parent": function(data) {3303 var loader = new Y.Loader({3304 require: ["widget-parent"],3305 ignoreRegistered: true,3306 allowRollup: false3307 });3308 loader.calculate();3309 //Testing A normal module3310 Assert.isTrue((loader.sorted.indexOf("widget-parent")) > -1, "Module (widget-parent) not found in sorted array");3311 },3312 "Testing widget-position": function(data) {3313 var loader = new Y.Loader({3314 require: ["widget-position"],3315 ignoreRegistered: true,3316 allowRollup: false3317 });3318 loader.calculate();3319 //Testing A normal module3320 Assert.isTrue((loader.sorted.indexOf("widget-position")) > -1, "Module (widget-position) not found in sorted array");3321 },3322 "Testing widget-position-align": function(data) {3323 var loader = new Y.Loader({3324 require: ["widget-position-align"],3325 ignoreRegistered: true,3326 allowRollup: false3327 });3328 loader.calculate();3329 //Testing A normal module3330 Assert.isTrue((loader.sorted.indexOf("widget-position-align")) > -1, "Module (widget-position-align) not found in sorted array");3331 },3332 "Testing widget-position-constrain": function(data) {3333 var loader = new Y.Loader({3334 require: ["widget-position-constrain"],3335 ignoreRegistered: true,3336 allowRollup: false3337 });3338 loader.calculate();3339 //Testing A normal module3340 Assert.isTrue((loader.sorted.indexOf("widget-position-constrain")) > -1, "Module (widget-position-constrain) not found in sorted array");3341 },3342 "Testing widget-skin": function(data) {3343 var loader = new Y.Loader({3344 require: ["widget-skin"],3345 ignoreRegistered: true,3346 allowRollup: false3347 });3348 loader.calculate();3349 //Testing A normal module3350 Assert.isTrue((loader.sorted.indexOf("widget-skin")) > -1, "Module (widget-skin) not found in sorted array");3351 },3352 "Testing widget-stack": function(data) {3353 var loader = new Y.Loader({3354 require: ["widget-stack"],3355 ignoreRegistered: true,3356 allowRollup: false3357 });3358 loader.calculate();3359 //Testing A normal module3360 Assert.isTrue((loader.sorted.indexOf("widget-stack")) > -1, "Module (widget-stack) not found in sorted array");3361 },3362 "Testing widget-stdmod": function(data) {3363 var loader = new Y.Loader({3364 require: ["widget-stdmod"],3365 ignoreRegistered: true,3366 allowRollup: false3367 });3368 loader.calculate();3369 //Testing A normal module3370 Assert.isTrue((loader.sorted.indexOf("widget-stdmod")) > -1, "Module (widget-stdmod) not found in sorted array");3371 },3372 "Testing widget-uievents": function(data) {3373 var loader = new Y.Loader({3374 require: ["widget-uievents"],3375 ignoreRegistered: true,3376 allowRollup: false3377 });3378 loader.calculate();3379 //Testing A normal module3380 Assert.isTrue((loader.sorted.indexOf("widget-uievents")) > -1, "Module (widget-uievents) not found in sorted array");3381 },3382 "Testing yql": function(data) {3383 var loader = new Y.Loader({3384 require: ["yql"],3385 ignoreRegistered: true,3386 allowRollup: false3387 });3388 loader.calculate();3389 //Testing A normal module3390 Assert.isTrue((loader.sorted.indexOf("yql")) > -1, "Module (yql) not found in sorted array");3391 },3392 "Testing yql-nodejs": function(data) {3393 var loader = new Y.Loader({3394 require: ["yql-nodejs"],3395 ignoreRegistered: true,3396 allowRollup: false3397 });3398 loader.calculate();3399 //Testing A normal module3400 Assert.isTrue((loader.sorted.indexOf("yql-nodejs")) > -1, "Module (yql-nodejs) not found in sorted array");3401 },3402 "Testing yql-winjs": function(data) {3403 var loader = new Y.Loader({3404 require: ["yql-winjs"],3405 ignoreRegistered: true,3406 allowRollup: false3407 });3408 loader.calculate();3409 //Testing A normal module3410 Assert.isTrue((loader.sorted.indexOf("yql-winjs")) > -1, "Module (yql-winjs) not found in sorted array");3411 } 3412}));...

Full Screen

Full Screen

map_functionality.js

Source:map_functionality.js Github

copy

Full Screen

...33 assert.throws(function () { Map.call(null); }, TypeError, "Map.call() throws TypeError given null");34 assert.throws(function () { Map.call(Map.prototype); }, TypeError, "Map.call() throws TypeError given Map.prototype");35 /*36 var map1 = Map.call(undefined);37 assert.isTrue(map1 !== null && map1 !== undefined && map1 !== Map.prototype, "Map constructor creates new Map object when this is undefined");3839 var map2 = Map.call(Map.prototype);40 assert.isTrue(map2 !== null && map2 !== undefined && map2 !== Map.prototype, "Map constructor creates new Map object when this is equal to Map.prototype");4142 var o = { };43 Object.preventExtensions(o);4445 assert.throws(function () { Map.call(null); }, TypeError, "Map constructor throws on null");46 assert.throws(function () { Map.call(o); }, TypeError, "Map constructor throws on non-extensible object");47 */48 }49 },5051 {52 name: "Map constructor throws when called on already initialized Map object",53 body: function () {54 var map = new Map();55 assert.throws(function () { Map.call(map); }, TypeError);5657 // Map is no longer allowed to be called as a function unless the object it is given58 // for its this argument already has the [[MapData]] property on it.59 // TODO: When we implement @@create support, update this test to reflect it.60 /*61 var obj = {};62 Map.call(obj);63 assert.throws(function () { Map.call(obj); }, TypeError);6465 function MyMap() {66 Map.call(this);67 }68 MyMap.prototype = new Map();69 MyMap.prototype.constructor = MyMap;7071 var mymap = new MyMap();72 assert.throws(function () { Map.call(mymap); }, TypeError);73 assert.throws(function () { MyMap.call(mymap); }, TypeError);74 */75 }76 },7778 {79 name: "Map constructor populates the map with key-values pairs from given optional iteratable argument",80 body: function () {81 var m = new Map([ ['a', 1], ['b', 2], ['c', 3] ]);8283 assert.areEqual(3, m.size, "m is initialized with three entries");84 assert.areEqual(1, m.get('a'), "m has key 'a' mapping to value 1");85 assert.areEqual(2, m.get('b'), "m has key 'b' mapping to value 2");86 assert.areEqual(3, m.get('c'), "m has key 'c' mapping to value 3");8788 var customIterable = {89 [Symbol.iterator]: function () {90 var i = 1;91 return {92 next: function () {93 return {94 done: i > 8,95 value: [ i++, i++ ]96 };97 }98 };99 }100 };101102 m = new Map(customIterable);103104 assert.areEqual(4, m.size, "m is initialized with four entries");105 assert.areEqual(2, m.get(1), "m has key 1 mapping to value 2");106 assert.areEqual(4, m.get(3), "m has key 3 mapping to value 4");107 assert.areEqual(6, m.get(5), "m has key 5 mapping to value 6");108 assert.areEqual(8, m.get(7), "m has key 7 mapping to value 8");109 }110 },111112 {113 name: "Map constructor throws exceptions for non- and malformed iterable arguments",114 body: function () {115 var iterableNoIteratorMethod = { [Symbol.iterator]: 123 };116 var iterableBadIteratorMethod = { [Symbol.iterator]: function () { } };117 var iterableNoIteratorNextMethod = { [Symbol.iterator]: function () { return { }; } };118 var iterableBadIteratorNextMethod = { [Symbol.iterator]: function () { return { next: 123 }; } };119 var iterableNoIteratorResultObject = { [Symbol.iterator]: function () { return { next: function () { } }; } };120121 assert.throws(function () { new Map(123); }, TypeError, "new Map() throws on non-object", "Function expected");122 assert.throws(function () { new Map({ }); }, TypeError, "new Map() throws on non-iterable object", "Function expected");123 assert.throws(function () { new Map(iterableNoIteratorMethod); }, TypeError, "new Map() throws on non-iterable object where @@iterator property is not a function", "Function expected");124 assert.throws(function () { new Map(iterableBadIteratorMethod); }, TypeError, "new Map() throws on non-iterable object where @@iterator function doesn't return an iterator", "Object expected");125 assert.throws(function () { new Map(iterableNoIteratorNextMethod); }, TypeError, "new Map() throws on iterable object where iterator object does not have next property", "Function expected");126 assert.throws(function () { new Map(iterableBadIteratorNextMethod); }, TypeError, "new Map() throws on iterable object where iterator object's next property is not a function", "Function expected");127 assert.throws(function () { new Map(iterableNoIteratorResultObject); }, TypeError, "new Map() throws on iterable object where iterator object's next method doesn't return an iterator result", "Object expected");128 }129 },130131 {132 name: "APIs throw TypeError where specified",133 body: function () {134 function MyMapImposter() { }135 MyMapImposter.prototype = new Map();136 MyMapImposter.prototype.constructor = MyMapImposter;137138 var o = new MyMapImposter();139140 assert.throws(function () { o.clear(); }, TypeError, "clear should throw if this doesn't have MapData property");141 assert.throws(function () { o.delete(1); }, TypeError, "delete should throw if this doesn't have MapData property");142 assert.throws(function () { o.forEach(function (v, k, s) { }); }, TypeError, "forEach should throw if this doesn't have MapData property");143 assert.throws(function () { o.get(1); }, TypeError, "get should throw if this doesn't have MapData property");144 assert.throws(function () { o.has(1); }, TypeError, "has should throw if this doesn't have MapData property");145 assert.throws(function () { o.set(1, 1); }, TypeError, "set should throw if this doesn't have MapData property");146 assert.throws(function () { WScript.Echo(o.size); }, TypeError, "size should throw if this doesn't have MapData property");147148 assert.throws(function () { Map.prototype.clear.call(); }, TypeError, "clear should throw if called with no arguments");149 assert.throws(function () { Map.prototype.delete.call(); }, TypeError, "delete should throw if called with no arguments");150 assert.throws(function () { Map.prototype.forEach.call(); }, TypeError, "forEach should throw if called with no arguments");151 assert.throws(function () { Map.prototype.get.call(); }, TypeError, "get should throw if called with no arguments");152 assert.throws(function () { Map.prototype.has.call(); }, TypeError, "has should throw if called with no arguments");153 assert.throws(function () { Map.prototype.set.call(); }, TypeError, "set should throw if called with no arguments");154 assert.throws(function () { Object.getOwnPropertyDescriptor(Map.prototype, "size").get.call(); }, TypeError, "size should throw if called with no arguments");155156 assert.throws(function () { Map.prototype.clear.call(null); }, TypeError, "clear should throw if this is null");157 assert.throws(function () { Map.prototype.delete.call(null, 1); }, TypeError, "delete should throw if this is null");158 assert.throws(function () { Map.prototype.forEach.call(null, function (v, k, s) { }); }, TypeError, "forEach should throw if this is null");159 assert.throws(function () { Map.prototype.get.call(null, 1); }, TypeError, "get should throw if this is null");160 assert.throws(function () { Map.prototype.has.call(null, 1); }, TypeError, "has should throw if this is null");161 assert.throws(function () { Map.prototype.set.call(null, 1, 1); }, TypeError, "set should throw if this is null");162 assert.throws(function () { Object.getOwnPropertyDescriptor(Map.prototype, "size").get.call(null); }, TypeError, "size should throw if this is null");163164 assert.throws(function () { Map.prototype.clear.call(undefined); }, TypeError, "clear should throw if this is undefined");165 assert.throws(function () { Map.prototype.delete.call(undefined, 1); }, TypeError, "delete should throw if this is undefined");166 assert.throws(function () { Map.prototype.forEach.call(undefined, function (v, k, s) { }); }, TypeError, "forEach should throw if this is undefined");167 assert.throws(function () { Map.prototype.get.call(undefined, 1); }, TypeError, "get should throw if this is undefined");168 assert.throws(function () { Map.prototype.has.call(undefined, 1); }, TypeError, "has should throw if this is undefined");169 assert.throws(function () { Map.prototype.set.call(undefined, 1, 1); }, TypeError, "set should throw if this is undefined");170 assert.throws(function () { Object.getOwnPropertyDescriptor(Map.prototype, "size").get.call(undefined); }, TypeError, "size should throw if this is undefined");171172 var map = new Map();173 assert.throws(function () { map.forEach(null); }, TypeError, "forEach should throw if its first argument is not callable, e.g. null");174 assert.throws(function () { map.forEach(undefined); }, TypeError, "forEach should throw if its first argument is not callable, e.g. undefined");175 assert.throws(function () { map.forEach(true); }, TypeError, "forEach should throw if its first argument is not callable, e.g. a boolean");176 assert.throws(function () { map.forEach(10); }, TypeError, "forEach should throw if its first argument is not callable, e.g. a number");177 assert.throws(function () { map.forEach("hello"); }, TypeError, "forEach should throw if its first argument is not callable, e.g. a string");178 }179 },180181 {182 name: "Basic usage, clear, delete, get, has, set, size",183 body: function () {184 var map = new Map();185186 assert.isTrue(map.size === 0, "Initially empty");187188 map.set(1, null);189 map.set(2, null);190 map.set("Hello", null);191 var o = {};192 map.set(o, null);193194 assert.isTrue(map.has(1), "Should contain 1");195 assert.isTrue(map.has(2), "Should contain 2");196 assert.isTrue(map.has("Hello"), "Should contain \"Hello\"");197 assert.isTrue(map.has(o), "Should contain o");198 assert.isTrue(map.get(1) === null, "Should map 1 to null");199 assert.isTrue(map.get(2) === null, "Should map 2 to null");200 assert.isTrue(map.get("Hello") === null, "Should map \"Hello\" to null");201 assert.isTrue(map.get(o) === null, "Should map o to null");202203 assert.isTrue(map.size === 4, "Should contain four keys");204205 assert.isFalse(map.has(0), "Shouldn't contain other keys");206 assert.isFalse(map.has("goodbye"), "Shouldn't contain other keys");207 assert.isFalse(map.has(map), "Shouldn't contain other keys");208 assert.isTrue(map.get(0) === undefined, "Should return undefined for non-existant key 0");209 assert.isTrue(map.get("goodbye") === undefined, "Should return undefined for non-existant key \"goodbye\"");210 assert.isTrue(map.get(map) === undefined, "Should return undefined for non-existant key map");211212 map.clear();213214 assert.isTrue(map.size === 0, "Should be empty again");215 assert.isFalse(map.has(1), "Should no longer contain 1");216 assert.isFalse(map.has(2), "Should no longer contain 2");217 assert.isFalse(map.has("Hello"), "Should no longer contain \"Hello\"");218 assert.isFalse(map.has(o), "Should no longer contain o");219220 map.set(1, null);221 map.set(2, null);222 map.set("Hello", null);223 map.set(o, null);224225 assert.isTrue(map.has(1), "Should contain 1 again");226 assert.isTrue(map.has(2), "Should contain 2 again");227 assert.isTrue(map.has("Hello"), "Should contain \"Hello\" again");228 assert.isTrue(map.has(o), "Should contain o again");229230 assert.isTrue(map.size === 4, "Should contain four keys again");231232 map.delete(2);233234 assert.isTrue(map.has(1), "Should still contain 1");235 assert.isFalse(map.has(2), "Should no longer contain 2");236 assert.isTrue(map.has("Hello"), "Should still contain \"Hello\"");237 assert.isTrue(map.has(o), "Should still contain o");238239 assert.isTrue(map.size === 3, "Should contain three keys now");240241 map.delete(o);242 map.delete("Hello");243244 assert.isTrue(map.has(1), "Should still contain 1");245 assert.isFalse(map.has(2), "Should no longer contain 2");246 assert.isFalse(map.has("Hello"), "Should no longer contain \"Hello\"");247 assert.isFalse(map.has(o), "Should no longer contain o");248249 assert.isTrue(map.size === 1, "Should contain one value now");250251 map.delete(1);252253 assert.isFalse(map.has(1), "Should no longer contain 1");254 assert.isTrue(map.size === 0, "Should be empty again");255256257 var p = { };258 map.set(1, 10);259 map.set(2, 20);260 map.set("Hello", "World");261 map.set(o, p);262263 assert.isTrue(map.get(1) === 10, "Should map 1 to 10");264 assert.isTrue(map.get(2) === 20, "Should map 2 to 20");265 assert.isTrue(map.get("Hello") === "World", "Should map \"Hello\" to \"World\"");266 assert.isTrue(map.get(o) === p, "Should map o to p");267268 map.set(1, p);269 map.set(2, "World");270 map.set("Hello", 10);271 map.set(o, 20);272273 assert.isTrue(map.get(1) === p, "Should map 1 to p");274 assert.isTrue(map.get(2) === "World", "Should map 2 to \"World\"");275 assert.isTrue(map.get("Hello") === 10, "Should map \"Hello\" to 10");276 assert.isTrue(map.get(o) === 20, "Should map o to 20");277 }278 },279280 {281 name: "Not specifying arguments should default them to undefined",282 body: function () {283 var map = new Map();284285 assert.isFalse(map.has(), "Should not have undefined");286 assert.isTrue(map.get() === undefined, "undefined is not in the map, get should return undefined");287 assert.isFalse(map.delete(), "undefined is not in the map, delete should return false");288289 map.set();290 assert.isTrue(map.has(), "Should have undefined");291 assert.isTrue(map.get() === undefined, "undefined is in the map, but set to undefined, so get should still return undefined");292 assert.isTrue(map.delete(), "undefined is in the map, delete should return true");293 assert.isFalse(map.has(), "Should no longer have undefined");294295 map.set(undefined);296 assert.isTrue(map.get() === undefined, "undefined is in the map, but set to undefined again, so get should still return undefined");297 map.delete();298299 // and just make sure that setting a value for undefined does in fact return that value and not undefined300 map.set(undefined, 10);301 assert.isTrue(map.get() === 10, "undefined is in the map and set to 10, get should return 10");302 }303 },304305 {306 name: "Extra arguments should be ignored",307 body: function () {308 var map = new Map();309310 assert.isFalse(map.has(1, 2, 3), "Looks for 1, ignores 2 and 3, map is empty so should return false");311 assert.isTrue(map.get(1, 2, 3) === undefined, "Looks for 1, ignores 2 and 3, map is empty so should return undefined");312 assert.isFalse(map.delete(1, 2, 3), "Tries to delete 1, ignores 2 and 3, map is empty so should return false");313314 // 3 and 4 should be ignored and not added to the map315 map.set(1, 2, 3, 4);316317 assert.isTrue(map.has(1), "Should contain 1");318 assert.isFalse(map.has(2), "Should not contain 2");319 assert.isFalse(map.has(3), "Should not contain 3");320 assert.isTrue(map.has(1, 2, 3), "Should contain 1, has should ignore 2 and 3");321 assert.isFalse(map.has(2, 1, 3), "Should not contain 2, has should ignore 1 and 3");322323 assert.isTrue(map.get(1) === 2, "Should map 1 to 2");324 assert.isTrue(map.get(2) === undefined, "Should not contain 2, return undefined");325 assert.isTrue(map.get(3) === undefined, "Should not contain 3, return undefined");326 assert.isTrue(map.get(1, 3, 4) === 2, "Should get value for 1, ignore 3 and 4");327 assert.isTrue(map.get(2, 1, 3) === undefined, "Should not contain 2, ignore 1 and 3, return undefined");328329 assert.isFalse(map.delete(2, 1, 3), "2 is not found so should return false, ignores 1 and 3");330 assert.isFalse(map.delete(3, 1), "3 is not found so should return false, ignores 1");331 assert.isTrue(map.delete(1, 2, 3), "1 is found and deleted, so should return true, ignores 2 and 3");332 }333 },334335 {336 name: "Delete should return true if item was in map, false if not",337 body: function () {338 var map = new Map();339340 map.set(1);341342 assert.isFalse(map.delete(2), "2 is not in the map, delete should return false");343 assert.isTrue(map.delete(1), "1 is in the map, delete should return true");344 assert.isFalse(map.delete(1), "1 is no longer in the map, delete should now return false");345 }346 },347348 {349 name: "Setting the same key twice is valid, and should modify the value",350 body: function () {351 var map = new Map();352353 map.set(1);354 map.set(1);355 map.set(2);356 map.delete(1);357 map.set(2);358 map.set(1);359 map.set(1);360361 map.clear();362363 map.set(1, 3);364 assert.isTrue(map.get(1) === 3, "1 maps to 3");365 map.set(1, 4);366 assert.isTrue(map.get(1) === 4, "1 maps to 4");367 map.set(2, 5);368 assert.isTrue(map.get(1) === 4, "1 still maps to 4");369 assert.isTrue(map.get(2) === 5, "2 maps to 5");370 map.delete(1);371 assert.isTrue(map.get(1) === undefined, "1 is no longer in the map");372 assert.isTrue(map.get(2) === 5, "2 still maps to 5");373 map.set(2, 6);374 assert.isTrue(map.get(2) === 6, "2 maps to 6");375 }376 },377378 {379 name: "clear returns undefined, set returns the map instance itself",380 body: function () {381 var map = new Map();382383 assert.areEqual(map, map.set(1, 2), "Setting new key should return Map instance");384 assert.areEqual(map, map.set(1, 2), "Setting existing key should return Map instance");385 assert.areEqual(undefined, map.clear(), "Clearing map should return undefined");386 }387 },388389 {390 name: "Value comparison is implemented according to SameValueZero algorithm defined in spec (i.e. not by object reference identity)",391 body: function () {392 var map = new Map();393394 map.set(3.14159);395 map.set("hello");396 map.set(8589934592);397398 assert.isTrue(map.has(3.14159), "Map contains floating point number");399 assert.isTrue(map.has(3.0 + 0.14159), "Map contains floating point number even if calculated differently");400 assert.isTrue(map.has("hello"), "Map contains string");401 assert.isTrue(map.has("hel" + "lo"), "Map contains string even if differnt reference identity");402 assert.isTrue(map.has(8589934592), "Map contains 64 bit integer value");403 assert.isTrue(map.has(65536 + 8589869056), "Map contains 64 bit integer value even if calculated diffrently");404405 map.set(-0, 5);406 assert.isTrue(map.has(-0), "Map contains -0");407 assert.isTrue(map.has(+0), "Map contains +0");408 assert.areEqual(5, map.get(-0), "-0 maps to 5");409 assert.areEqual(5, map.get(+0), "+0 maps to 5");410 map.set(0, 10);411 assert.isTrue(map.has(-0), "Map still contains -0");412 assert.isTrue(map.has(+0), "Map still contains +0");413 assert.areEqual(10, map.get(-0), "-0 now maps to 10");414 assert.areEqual(10, map.get(+0), "+0 now maps to 10");415 map.delete(-0);416 assert.isFalse(map.has(-0), "Map does not contain -0");417 assert.isFalse(map.has(+0), "Map does not contain +0");418419 map.set(+0, 5);420 assert.isTrue(map.has(-0), "Map contains -0");421 assert.isTrue(map.has(+0), "Map contains +0");422 assert.areEqual(5, map.get(-0), "-0 maps to 5");423 assert.areEqual(5, map.get(+0), "+0 maps to 5");424 map.set(-0, 10);425 assert.isTrue(map.has(-0), "Map still contains -0");426 assert.isTrue(map.has(+0), "Map still contains +0");427 assert.areEqual(10, map.get(-0), "-0 now maps to 10");428 assert.areEqual(10, map.get(+0), "+0 now maps to 10");429 map.delete(0);430 assert.isFalse(map.has(-0), "Map does not contain -0");431 assert.isFalse(map.has(+0), "Map does not contain +0");432433 map.set(Number.NEGATIVE_INFINITY);434 assert.isTrue(map.has(Number.NEGATIVE_INFINITY), "Map contains negative infinity");435 assert.isFalse(map.has(Number.POSITIVE_INFINITY), "Map does not contain positive infinity");436 map.set(Infinity);437 assert.isTrue(map.has(Number.NEGATIVE_INFINITY), "Map contains negative infinity");438 assert.isTrue(map.has(Number.POSITIVE_INFINITY), "Map contains positive infinity");439 map.delete(Number.NEGATIVE_INFINITY);440 assert.isFalse(map.has(Number.NEGATIVE_INFINITY), "Map does not contain negative infinity");441 assert.isTrue(map.has(Number.POSITIVE_INFINITY), "Map contains positive infinity");442443 assert.isFalse(map.has(NaN), "Map does not contain NaN");444 map.set(NaN);445 assert.isTrue(map.has(NaN), "Map contains NaN");446 assert.isTrue(map.has(parseInt("blah")), "Map contains NaN resulting from parseInt(\"Blah\")");447 assert.isTrue(map.has(Math.sqrt(-1)), "Map contains NaN resulting from Math.sqrt(-1)");448 assert.isTrue(map.has(0 * Infinity), "Map contains NaN resulting from 0 * Infinity");449 }450 },451452 {453 name: "forEach should map the this value of the callback correctly",454 body: function () {455 var map = new Map();456 map.set(1);457458 map.forEach(function (val, key, map) {459 assert.isTrue(this === globalObject, "map.forEach should use undefined as value of this keyword if second argument is not specified which is converted to the global object");460 });461462 var o = { };463 map.forEach(function (val, key, map) {464 assert.isTrue(this === o, "map.forEach should use second argument if specified as value of this keyword");465 }, o);466467 map.forEach(function (val, key, map) {468 assert.isTrue(this.valueOf() === 10, "map.forEach should use second argument if specified as value of this keyword even if it is a non-object (which will be converted to an object)");469 }, 10);470 }471 },472473 {474 name: "forEach should enumerate map items in insertion order and should not call the callback for empty maps",475 body: function () {476 var i = 0;477 var map = getNewMapWith12345();478 var didExecute = false;479480 map.forEach(function (val, key, map) {481 i += 1;482 assert.isTrue(key == i, "map.forEach should enumerate keys 1, 2, 3, 4, 5 in that order");483 assert.isTrue(val == i + 5, "map.forEach should enumerate values 6, 7, 8, 9, 10 in that order");484 didExecute = true;485 });486 assert.isTrue(didExecute, "map.forEach should have enumerated items");487488 // a second forEach should start at the beginning again489 i = 0;490 didExecute = false;491 map.forEach(function (val, key, map) {492 i += 1;493 assert.isTrue(key == i, "Repeated map.forEach should enumerate keys 1, 2, 3, 4, 5 in that order again");494 assert.isTrue(val == i + 5, "map.forEach should enumerate values 6, 7, 8, 9, 10 in that order again");495 didExecute = true;496 });497 assert.isTrue(didExecute, "map.forEach should have enumerated items");498499 map.clear();500 map.forEach(function (val, key, map) {501 assert.fail("Shouldn't execute; map should be empty");502 });503504505 map = new Map();506 map.forEach(function (val, key, map) {507 assert.fail("Shouldn't execute; map should be empty");508 });509510 }511 },512513 {514 name: "forEach should enumerate all map items if any deletes occur on items that have already been enumerated",515 body: function () {516 var i = 0;517 var map = getNewMapWith12345();518 var didExecute = false;519520 map.forEach(function (val, key, map) {521 map.delete(key);522 i += 1;523 assert.isTrue(key == i, "map.forEach should enumerate keys 1, 2, 3, 4, 5 in that order");524 assert.isTrue(val == i + 5, "map.forEach should enumerate values 6, 7, 8, 9, 10 in that order");525 didExecute = true;526 });527 assert.isTrue(didExecute, "map.forEach should have enumerated items");528529 map.forEach(function (val, key, map) {530 assert.fail("Shouldn't execute; map should be empty");531 });532533534 i = 0;535 map = getNewMapWith12345();536537 didExecute = false;538 map.forEach(function (val, key, map) {539 if (key >= 3) {540 map.delete(key - 2);541 }542 i += 1;543 assert.isTrue(key == i, "map.forEach should enumerate keys 1, 2, 3, 4, 5 in that order");544 assert.isTrue(val == i + 5, "map.forEach should enumerate values 6, 7, 8, 9, 10 in that order");545 didExecute = true;546 });547 assert.isTrue(didExecute, "map.forEach should have enumerated items");548549 i = 3;550 didExecute = false;551 map.forEach(function (val, key, map) {552 i += 1;553 assert.isTrue(key == i, "map.forEach should enumerate keys 4, 5 in that order");554 assert.isTrue(val == i + 5, "map.forEach should enumerate values 9, 10 in that order");555 didExecute = true;556 });557 assert.isTrue(didExecute, "map.forEach should have enumerated items");558 }559 },560561 {562 name: "forEach should not enumerate map items that are deleted during enumeration before being visited",563 body: function () {564 var i = 1;565 var map = getNewMapWith12345();566 var didExecute = false;567568 map.forEach(function (val, key, map) {569 assert.isTrue(key == i, "map.forEach should enumerate keys 1, 3, 5 in that order");570 assert.isTrue(val == i + 5, "map.forEach should enumerate values 6, 8, 10 in that order");571 map.delete(key + 1);572 i += 2;573 didExecute = true;574 });575 assert.isTrue(didExecute, "map.forEach should have enumerated items");576577 didExecute = false;578 map.forEach(function (val, key, map) {579 assert.isTrue(key == 1, "map.forEach should enumerate key 1 only");580 assert.isTrue(val == 6, "map.forEach should enumerate value 6 only");581 map.delete(3);582 map.delete(5);583 didExecute = true;584 });585 assert.isTrue(didExecute, "map.forEach should have enumerated items");586587 didExecute = false;588 map.forEach(function (val, key, map) {589 assert.isTrue(key == 1, "map.forEach should enumerate 1 only again");590 assert.isTrue(val == 6, "map.forEach should enumerate value 6 only again");591 map.delete(1);592 didExecute = true;593 });594 assert.isTrue(didExecute, "map.forEach should have enumerated items");595596 map.forEach(function (val, key, map) {597 assert.fail("Shouldn't execute, map should be empty");598 });599600601 map = getNewMapWith12345();602603 i = 0;604 didExecute = false;605 map.forEach(function (val, key, map) {606 map.delete(6 - key);607 i += 1;608 assert.isTrue(key == i && key <= 3, "map.forEach should enumerate keys 1, 2, 3 in that order");609 assert.isTrue(val == i + 5 && val <= 8, "map.forEach should enumerate values 6, 7, 8 in that order");610 didExecute = true;611 });612 assert.isTrue(didExecute, "map.forEach should have enumerated items");613614 i = 0;615 didExecute = false;616 map.forEach(function (val, key, map) {617 i += 1;618 assert.isTrue(key == i && key <= 2, "map.forEach should enumerate 1, 2 in that order");619 assert.isTrue(val == i + 5 && val <= 7, "map.forEach should enumerate values 6, 7 in that order");620 didExecute = true;621 });622 assert.isTrue(didExecute, "map.forEach should have enumerated items");623 }624 },625626 {627 name: "forEach should continue to enumerate items as long as they are added but only if they were not already in the map, and changing an existing key's value doesn't change its position",628 body: function () {629 var i = 0;630 var map = new Map();631 map.set(1, 21);632633 map.forEach(function (val, key, map) {634 i += 1;635 assert.isTrue(key == i, "map.forEach should enumerate keys 1 through 20 in order");636 assert.isTrue(val == i + 20, "map.forEach should enumerate values 21 through 40 in order");637 if (key < 20)638 {639 map.set(key + 1, val + 1);640 }641 });642 assert.isTrue(i == 20, "map.forEach should have enumerated up to 20");643644 i = 0;645 map.forEach(function (val, key, map) {646 i += 1;647 assert.isTrue(key == i, "map.forEach should only enumerate 1 through 20 in order once each, no duplicates");648 if (key < 20)649 {650 map.set(key + 1, i);651 }652 });653 assert.isTrue(i == 20, "map.forEach should have enumerated up to 20 again");654 }655 },656657 {658 name: "forEach should stop enumerating items if the map is cleared during enumeration",659 body: function () {660 var i = 0;661 var map = getNewMapWith12345();662663 map.forEach(function (val, key, map) {664 i += 1;665 assert.isTrue(key == i, "map.forEach should enumerate 1 and stop");666 if (key == 1)667 {668 map.clear();669 }670 });671 assert.isTrue(i == 1, "map.forEach should have stopped after 1");672673 i = 0;674 map = getNewMapWith12345();675 map.forEach(function (val, key, map) {676 i += 1;677 assert.isTrue(key == i, "map.forEach should enumerate 1, 2 and stop");678 if (key == 2)679 {680 map.clear();681 }682 });683 assert.isTrue(i == 2, "map.forEach should have stopped after 1, 2");684685 i = 0;686 map = getNewMapWith12345();687 map.forEach(function (val, key, map) {688 i += 1;689 assert.isTrue(key == i, "map.forEach should enumerate 1, 2, 3 and stop");690 if (key == 3)691 {692 map.clear();693 }694 });695 assert.isTrue(i == 3, "map.forEach should have stopped after 1, 2, 3");696697 i = 0;698 map = getNewMapWith12345();699 map.forEach(function (val, key, map) {700 i += 1;701 assert.isTrue(key == i, "map.forEach should enumerate 1, 2, 3, 4 and stop");702 if (key == 4)703 {704 map.clear();705 }706 });707 assert.isTrue(i == 4, "map.forEach should have stopped after 1, 2, 3, 4");708709 i = 0;710 map = getNewMapWith12345();711 map.forEach(function (val, key, map) {712 i += 1;713 assert.isTrue(key == i, "map.forEach should enumerate 1, 2, 3, 4, 5 and stop");714 if (key == 5)715 {716 map.clear();717 }718 });719 assert.isTrue(i == 5, "map.forEach should have enumerated all 1, 2, 3, 4, 5");720 assert.isTrue(map.size == 0, "map should be empty");721 }722 },723724 {725 name: "forEach should revisit items if they are removed after being visited but re-added before enumeration stops",726 body: function () {727 var i = 0;728 var didExecute = false;729 var map = getNewMapWith12345();730731 map.forEach(function (val, key, map) {732 if (key == 3) {733 map.delete(2);734 map.delete(1);735 map.set(1);736 map.set(2);737 }738739 i += 1;740 assert.isTrue(key == i, "map.forEach should enumerate 1, 2, 3, 4, 5, 1, 2 in that order");741 if (key == 5) {742 i = 0;743 }744745 didExecute = true;746 });747 assert.isTrue(didExecute, "map.forEach should have enumerated items");748749 i = 2;750 didExecute = false;751 map.forEach(function (val, key, map) {752 i += 1;753 assert.isTrue(key == i, "map.forEach should enumerate 3, 4, 5, 1, 2 in that order");754 if (key == 5) {755 i = 0;756 }757758 didExecute = true;759 });760 assert.isTrue(didExecute, "map.forEach should have enumerated items");761 }762 },763764 {765 name: "forEach should continue enumeration indefinitely if items are repeatedly removed and re-added without end",766 body: function () {767 var map = new Map();768 map.set(1, 0);769 map.set(2, 1);770771 var keys = [ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 ];772 var i = 0;773774 map.forEach(function (val, key, map) {775 if (i < 9) {776 if (key == 1) {777 map.delete(1);778 map.set(2, i + 1);779 } else if (key == 2) {780 map.delete(2);781 map.set(1, i + 1);782 }783 }784785 assert.isTrue(key == keys[i], "map.forEach should enumerate 1, 2, 1, 2, 1, 2, 1, 2, 1, 2");786 assert.isTrue(val == i, "map.forEach should enumerate values 0, 1, 2, 3, 4, 5, 6, 7, 8, 9");787788 i += 1;789 });790 assert.isTrue(i == 10, "map.forEach should have called the callback 10 times");791 }792 },793794 {795 name: "Map.prototype.set should normalize -0 keys to +0 which is observable via Map.prototype.forEach",796 body: function() {797 var map = new Map();798799 map.set(-0);800801 map.forEach(function (val, key, map) {802 // do not use assert.areEqual(-0, ...) because it compares -0 and +0 as equal803 assert.isTrue(+Infinity === 1 / key && key === 0, "-0 keys are normalized to +0");804 });805 }806 },807];808 ...

Full Screen

Full Screen

compatibility-test.js

Source:compatibility-test.js Github

copy

Full Screen

...7 'topic': function () {8 return compatibilityFrom({});9 },10 'gets default compatibility': function (compat) {11 assert.isTrue(compat.colors.opacity);12 assert.isTrue(compat.properties.colors);13 assert.isTrue(compat.properties.backgroundClipMerging);14 assert.isTrue(compat.properties.backgroundOriginMerging);15 assert.isTrue(compat.properties.backgroundSizeMerging);16 assert.isFalse(compat.properties.ieBangHack);17 assert.isFalse(compat.properties.ieFilters);18 assert.isFalse(compat.properties.iePrefixHack);19 assert.isFalse(compat.properties.ieSuffixHack);20 assert.isTrue(compat.properties.merging);21 assert.isFalse(compat.properties.shorterLengthUnits);22 assert.isTrue(compat.properties.spaceAfterClosingBrace);23 assert.isFalse(compat.properties.urlQuotes);24 assert.isTrue(compat.properties.zeroUnits);25 assert.isFalse(compat.selectors.adjacentSpace);26 assert.isFalse(compat.selectors.ie7Hack);27 assert.isTrue(compat.selectors.multiplePseudoMerging);28 assert.isTrue(compat.units.ch);29 assert.isTrue(compat.units.in);30 assert.isTrue(compat.units.pc);31 assert.isTrue(compat.units.pt);32 assert.isTrue(compat.units.rem);33 assert.isTrue(compat.units.vh);34 assert.isTrue(compat.units.vm);35 assert.isTrue(compat.units.vmax);36 assert.isTrue(compat.units.vmin);37 assert.isTrue(compat.units.vw);38 }39 },40 'not given': {41 'topic': function () {42 return compatibilityFrom();43 },44 'gets default compatibility': function (compat) {45 assert.deepEqual(compat, compatibilityFrom({}));46 }47 },48 'as a populated hash': {49 'topic': function () {50 return compatibilityFrom({ units: { rem: false, vmax: false }, properties: { prefix: true } });51 },52 'gets merged compatibility': function (compat) {53 assert.isTrue(compat.colors.opacity);54 assert.isTrue(compat.properties.backgroundClipMerging);55 assert.isTrue(compat.properties.backgroundOriginMerging);56 assert.isTrue(compat.properties.backgroundSizeMerging);57 assert.isTrue(compat.properties.colors);58 assert.isFalse(compat.properties.ieBangHack);59 assert.isFalse(compat.properties.ieFilters);60 assert.isFalse(compat.properties.iePrefixHack);61 assert.isFalse(compat.properties.ieSuffixHack);62 assert.isTrue(compat.properties.merging);63 assert.isFalse(compat.properties.shorterLengthUnits);64 assert.isTrue(compat.properties.spaceAfterClosingBrace);65 assert.isTrue(compat.properties.zeroUnits);66 assert.isFalse(compat.selectors.adjacentSpace);67 assert.isFalse(compat.selectors.ie7Hack);68 assert.isTrue(compat.selectors.multiplePseudoMerging);69 assert.isTrue(compat.units.ch);70 assert.isTrue(compat.units.in);71 assert.isTrue(compat.units.pc);72 assert.isTrue(compat.units.pt);73 assert.isFalse(compat.units.rem);74 assert.isTrue(compat.units.vh);75 assert.isTrue(compat.units.vm);76 assert.isFalse(compat.units.vmax);77 assert.isTrue(compat.units.vmin);78 assert.isTrue(compat.units.vw);79 }80 }81 })82 .addBatch({83 'as an ie9 template': {84 'topic': function () {85 return compatibilityFrom('ie9');86 },87 'gets template compatibility': function (compat) {88 assert.isTrue(compat.colors.opacity);89 assert.isTrue(compat.properties.backgroundClipMerging);90 assert.isTrue(compat.properties.backgroundOriginMerging);91 assert.isTrue(compat.properties.backgroundSizeMerging);92 assert.isTrue(compat.properties.colors);93 assert.isFalse(compat.properties.ieBangHack);94 assert.isTrue(compat.properties.ieFilters);95 assert.isFalse(compat.properties.iePrefixHack);96 assert.isTrue(compat.properties.ieSuffixHack);97 assert.isTrue(compat.properties.merging);98 assert.isFalse(compat.properties.shorterLengthUnits);99 assert.isTrue(compat.properties.spaceAfterClosingBrace);100 assert.isFalse(compat.properties.urlQuotes);101 assert.isTrue(compat.properties.zeroUnits);102 assert.isFalse(compat.selectors.adjacentSpace);103 assert.isFalse(compat.selectors.ie7Hack);104 assert.isTrue(compat.selectors.multiplePseudoMerging);105 assert.isTrue(compat.units.ch);106 assert.isTrue(compat.units.in);107 assert.isTrue(compat.units.pc);108 assert.isTrue(compat.units.pt);109 assert.isTrue(compat.units.rem);110 assert.isTrue(compat.units.vh);111 assert.isTrue(compat.units.vm);112 assert.isTrue(compat.units.vmax);113 assert.isTrue(compat.units.vmin);114 assert.isTrue(compat.units.vw);115 }116 },117 'as an ie8 template': {118 'topic': function () {119 return compatibilityFrom('ie8');120 },121 'gets template compatibility': function (compat) {122 assert.isFalse(compat.colors.opacity);123 assert.isFalse(compat.properties.backgroundClipMerging);124 assert.isFalse(compat.properties.backgroundOriginMerging);125 assert.isFalse(compat.properties.backgroundSizeMerging);126 assert.isTrue(compat.properties.colors);127 assert.isFalse(compat.properties.ieBangHack);128 assert.isTrue(compat.properties.ieFilters);129 assert.isTrue(compat.properties.iePrefixHack);130 assert.isTrue(compat.properties.ieSuffixHack);131 assert.isFalse(compat.properties.merging);132 assert.isFalse(compat.properties.shorterLengthUnits);133 assert.isTrue(compat.properties.spaceAfterClosingBrace);134 assert.isFalse(compat.properties.urlQuotes);135 assert.isTrue(compat.properties.zeroUnits);136 assert.isFalse(compat.selectors.adjacentSpace);137 assert.isFalse(compat.selectors.ie7Hack);138 assert.isTrue(compat.selectors.multiplePseudoMerging);139 assert.isFalse(compat.units.ch);140 assert.isTrue(compat.units.in);141 assert.isTrue(compat.units.pc);142 assert.isTrue(compat.units.pt);143 assert.isFalse(compat.units.rem);144 assert.isFalse(compat.units.vh);145 assert.isFalse(compat.units.vm);146 assert.isFalse(compat.units.vmax);147 assert.isFalse(compat.units.vmin);148 assert.isFalse(compat.units.vw);149 }150 },151 'as an ie7 template': {152 'topic': function () {153 return compatibilityFrom('ie7');154 },155 'gets template compatibility': function (compat) {156 assert.isFalse(compat.colors.opacity);157 assert.isFalse(compat.properties.backgroundClipMerging);158 assert.isFalse(compat.properties.backgroundOriginMerging);159 assert.isFalse(compat.properties.backgroundSizeMerging);160 assert.isTrue(compat.properties.colors);161 assert.isTrue(compat.properties.ieBangHack);162 assert.isTrue(compat.properties.ieFilters);163 assert.isTrue(compat.properties.iePrefixHack);164 assert.isTrue(compat.properties.ieSuffixHack);165 assert.isFalse(compat.properties.merging);166 assert.isFalse(compat.properties.shorterLengthUnits);167 assert.isTrue(compat.properties.spaceAfterClosingBrace);168 assert.isFalse(compat.properties.urlQuotes);169 assert.isTrue(compat.properties.zeroUnits);170 assert.isFalse(compat.selectors.adjacentSpace);171 assert.isTrue(compat.selectors.ie7Hack);172 assert.isFalse(compat.units.ch);173 assert.isTrue(compat.units.in);174 assert.isTrue(compat.units.pc);175 assert.isTrue(compat.units.pt);176 assert.isFalse(compat.units.rem);177 assert.isFalse(compat.units.vh);178 assert.isFalse(compat.units.vm);179 assert.isFalse(compat.units.vmax);180 assert.isFalse(compat.units.vmin);181 assert.isFalse(compat.units.vw);182 }183 },184 'as an unknown template': {185 'topic': function () {186 return compatibilityFrom('');187 },188 'gets default compatibility': function (compat) {189 assert.deepEqual(compat, compatibilityFrom({}));190 }191 }192 })193 .addBatch({194 'as a complex string value with group': {195 'topic': function () {196 return compatibilityFrom('ie8,-properties.iePrefixHack,+colors.opacity');197 },198 'gets calculated compatibility': function (compat) {199 assert.isTrue(compat.colors.opacity);200 assert.isFalse(compat.properties.backgroundClipMerging);201 assert.isFalse(compat.properties.backgroundOriginMerging);202 assert.isFalse(compat.properties.backgroundSizeMerging);203 assert.isTrue(compat.properties.colors);204 assert.isFalse(compat.properties.ieBangHack);205 assert.isTrue(compat.properties.ieFilters);206 assert.isFalse(compat.properties.iePrefixHack);207 assert.isTrue(compat.properties.ieSuffixHack);208 assert.isFalse(compat.properties.merging);209 assert.isFalse(compat.properties.shorterLengthUnits);210 assert.isTrue(compat.properties.spaceAfterClosingBrace);211 assert.isFalse(compat.properties.urlQuotes);212 assert.isTrue(compat.properties.zeroUnits);213 assert.isFalse(compat.selectors.adjacentSpace);214 assert.isFalse(compat.selectors.ie7Hack);215 assert.isTrue(compat.selectors.multiplePseudoMerging);216 assert.isFalse(compat.units.ch);217 assert.isTrue(compat.units.in);218 assert.isTrue(compat.units.pc);219 assert.isTrue(compat.units.pt);220 assert.isFalse(compat.units.rem);221 assert.isFalse(compat.units.vh);222 assert.isFalse(compat.units.vm);223 assert.isFalse(compat.units.vmax);224 assert.isFalse(compat.units.vmin);225 assert.isFalse(compat.units.vw);226 }227 },228 'as a single string value without group': {229 'topic': function () {230 return compatibilityFrom('+properties.iePrefixHack');231 },232 'gets calculated compatibility': function (compat) {233 assert.isTrue(compat.colors.opacity);234 assert.isTrue(compat.properties.colors);235 assert.isTrue(compat.properties.backgroundClipMerging);236 assert.isTrue(compat.properties.backgroundOriginMerging);237 assert.isTrue(compat.properties.backgroundSizeMerging);238 assert.isFalse(compat.properties.ieBangHack);239 assert.isFalse(compat.properties.ieFilters);240 assert.isTrue(compat.properties.iePrefixHack);241 assert.isFalse(compat.properties.ieSuffixHack);242 assert.isTrue(compat.properties.merging);243 assert.isFalse(compat.properties.shorterLengthUnits);244 assert.isTrue(compat.properties.spaceAfterClosingBrace);245 assert.isFalse(compat.properties.urlQuotes);246 assert.isTrue(compat.properties.zeroUnits);247 assert.isFalse(compat.selectors.adjacentSpace);248 assert.isFalse(compat.selectors.ie7Hack);249 assert.isTrue(compat.selectors.multiplePseudoMerging);250 assert.isTrue(compat.units.ch);251 assert.isTrue(compat.units.in);252 assert.isTrue(compat.units.pc);253 assert.isTrue(compat.units.pt);254 assert.isTrue(compat.units.rem);255 assert.isTrue(compat.units.vh);256 assert.isTrue(compat.units.vm);257 assert.isTrue(compat.units.vmax);258 assert.isTrue(compat.units.vmin);259 assert.isTrue(compat.units.vw);260 }261 },262 'as a complex string value without group': {263 'topic': function () {264 return compatibilityFrom('+properties.iePrefixHack,-units.rem');265 },266 'gets calculated compatibility': function (compat) {267 assert.isTrue(compat.colors.opacity);268 assert.isTrue(compat.properties.colors);269 assert.isTrue(compat.properties.backgroundClipMerging);270 assert.isTrue(compat.properties.backgroundOriginMerging);271 assert.isTrue(compat.properties.backgroundSizeMerging);272 assert.isFalse(compat.properties.ieBangHack);273 assert.isFalse(compat.properties.ieFilters);274 assert.isTrue(compat.properties.iePrefixHack);275 assert.isFalse(compat.properties.ieSuffixHack);276 assert.isTrue(compat.properties.merging);277 assert.isFalse(compat.properties.shorterLengthUnits);278 assert.isTrue(compat.properties.spaceAfterClosingBrace);279 assert.isFalse(compat.properties.urlQuotes);280 assert.isTrue(compat.properties.zeroUnits);281 assert.isFalse(compat.selectors.adjacentSpace);282 assert.isFalse(compat.selectors.ie7Hack);283 assert.isTrue(compat.selectors.multiplePseudoMerging);284 assert.isTrue(compat.units.ch);285 assert.isTrue(compat.units.in);286 assert.isTrue(compat.units.pc);287 assert.isTrue(compat.units.pt);288 assert.isFalse(compat.units.rem);289 assert.isTrue(compat.units.vh);290 assert.isTrue(compat.units.vm);291 assert.isTrue(compat.units.vmax);292 assert.isTrue(compat.units.vmin);293 assert.isTrue(compat.units.vw);294 }295 }296 })...

Full Screen

Full Screen

regex-case-folding.js

Source:regex-case-folding.js Github

copy

Full Screen

...8var tests = [9 {10 name: "Case-folding should be applied for a single character pattern when the unicode flag is present",11 body: function () {12 assert.isTrue(/a/ui.test("A"), "UnicodeData fallback");13 assert.isTrue(/\u004b/ui.test("\u212a"), "Code unit");14 }15 },16 {17 name: "Case-folding should NOT be applied for a single character pattern when the unicode flag is NOT present",18 body: function () {19 assert.isFalse(/\u004b/i.test("\u212a"));20 }21 },22 {23 name: "Case-folding should be applied for a single character term when the unicode flag is present",24 body: function () {25 assert.isTrue(/aa|b/ui.test("B"), "UnicodeData fallback");26 assert.isTrue(/aa|\u004b/ui.test("\u212a"), "Code unit");27 }28 },29 {30 name: "Case-folding should NOT be applied for a single character term when the unicode flag is NOT present",31 body: function () {32 assert.isFalse(/aa|\u004b/i.test("\u212a"));33 }34 },35 {36 name: "Case-folding should be applied for literals using literal instruction when the unicode flag is present",37 body: function () {38 assert.isTrue(/^aaa/ui.test("aaA"), "MatchLiteralInst: UnicodeData fallback");39 assert.isTrue(/^aa\u004b/ui.test("aa\u212a"), "MatchLiteralInst: Code unit");4041 assert.isTrue(/aaa/ui.test("aaA"), "SyncToLiteral...Inst: UnicodeData fallback");42 assert.isTrue(/aa\u004b/ui.test("aa\u212a"), "SyncToLiteral...Inst: Code unit");4344 assert.isTrue(/aa\u{10429}/ui.test("aa\u{10401}"), "Code point in both RegExp and string to test");45 assert.isTrue(/aa\u{10429}/ui.test("aa\ud801\udc01"), "Code point in RegExp and surrogate pair in string to test");46 assert.isTrue(/aa\ud801\udc29/ui.test("aa\u{10401}"), "Surrogate pair in RegExp and code point in string to test");47 assert.isTrue(/aa\ud801\udc29/ui.test("aa\ud801\udc01"), "Surrogate pair in both RegExp and string to test");48 assert.isTrue(/aa\u{10429}\u{10429}/ui.test("aa\u{10401}\u{10401}"), "Multiple code points");49 assert.isTrue(/aa\ud801\udc29\ud801\udc29/ui.test("aa\ud801\udc29\ud801\udc29"), "Multiple surrogate pairs");50 }51 },52 {53 name: "Case-folding should NOT be applied for literals using literal instruction when the unicode flag is NOT present",54 body: function () {55 assert.isFalse(/^aa\u004b/i.test("aa\u212a"), "MatchLiteralInst");56 assert.isFalse(/aa\u004b/i.test("aa\u212a"), "SyncToLiteral...Inst");57 }58 },59 {60 name: "Case-folding should be applied for character sets when the unicode flag is present",61 body: function () {62 assert.isTrue(/^[ab]/ui.test("A"), "MatchSetInst: UnicodeData fallback");63 assert.isTrue(/^[a\u004b]/ui.test("\u212a"), "MatchSetInst: Code unit");6465 assert.isTrue(/[ab]/ui.test("A"), "SyncToSet...Inst: UnicodeData fallback");66 assert.isTrue(/[a\u004b]/ui.test("\u212a"), "SyncToSet...Inst: Code unit");6768 assert.isTrue(/[a\u{10429}]/ui.test("\u{10401}"), "Code point in both RegExp and in string to test");69 assert.isTrue(/[a\u{10429}]/ui.test("\ud801\udc01"), "Code point in RegExp and surrogate pair in string to test");70 assert.isTrue(/[a\ud801\udc29]/ui.test("\u{10401}"), "Surrogate pair in RegExp and code point in string to test");71 assert.isTrue(/[a\ud801\udc29]/ui.test("\ud801\udc01"), "Surrogate pair in both RegExp and string to test");72 assert.isTrue(/[\u{10428}-\u{10430}]/ui.test("\u{10401}"), "Code point range");73 assert.isTrue(/[\ud801\udc28-\ud801\udc30]/ui.test("\ud801\udc01"), "Surrogate pair range");74 }75 },76 {77 name: "Case-folding should NOT be applied for character sets when the unicode flag is NOT present",78 body: function () {79 assert.isFalse(/^[a\u004b]/i.test("\u212a"), "MatchSetInst");80 assert.isFalse(/[a\u004b]/i.test("\u212a"), "SyncToSet...Inst");81 }82 },83 {84 name: "Case-folding should be applied for back references when the unicode flag is present",85 body: function () {86 assert.isTrue(/(a)\1/ui.test("aA"), "UnicodeData fallback");87 assert.isTrue(/(\u004b)\1/ui.test("\u004b\u212a"), "Code unit");88 assert.isTrue(/(\u{10429})\1/ui.test("\u{10429}\u{10401}"), "Code point in both RegExp and string to test");89 assert.isTrue(/(\u{10429})\1/ui.test("\u{10429}\ud801\udc01"), "Code point in RegExp and surrogate pair in string to test");90 assert.isTrue(/(\ud801\udc29)\1/ui.test("\ud801\udc29\u{10401}"), "Surrogate pair in RegExp and code point in string to test");91 assert.isTrue(/(\ud801\udc29)\1/ui.test("\ud801\udc29\ud801\udc29"), "Surrogate pair in both RegExp and string to test");92 assert.isTrue(/(\u{10429}\u{10429})\1/ui.test("\u{10429}\u{10429}\u{10401}\u{10401}"), "Multiple code points");93 assert.isTrue(/(\ud801\udc29\ud801\udc29)\1/ui.test("\ud801\udc29\ud801\udc29\ud801\udc01\ud801\udc01"), "Multiple surrogate pairs");94 }95 },96 {97 name: "Case-folding should NOT be applied for back references when the unicode flag is NOT present",98 body: function () {99 assert.isFalse(/(\u004b)\1/i.test("\u004b\u212a"), "Code unit");100 }101 },102 {103 name: "Case-folding should be applied for quantifiers when the unicode flag is present",104 body: function () {105 assert.isTrue(/^aa(?:\u004b)?/ui.test("aa\u212a"), "?");106 assert.isTrue(/^aa(?:\u004b)+/ui.test("aa\u004b\u212a"), "+");107 assert.isTrue(/^aa(?:\u004b)*/ui.test("aa\u004b\u212a"), "*");108 assert.isTrue(/^aa(?:\u004b){2}/ui.test("aa\u004b\u212a"), "{2}");109 }110 },111 {112 name: "Up to four code points should be in the same case-folding equivalence group",113 body: function () {114 var equivs = ["0399", "03b9", "1fbe"];115 equivs.forEach(function (hex) {116 var equivChar = eval("'\\u" + hex + "'");117 assert.isTrue(/\u0345/ui.test(equivChar), "\\u0345 -> \\u" + hex + " as a single character pattern");118 assert.isTrue(/^\u0345/ui.test(equivChar), "MatchChar4Inst: \\u0345 -> \\u" + hex + " as a single character pattern");119 assert.isTrue(/aa|\u0345/ui.test(equivChar), "SyncToSetAndContinue: \\u0345 -> \\u" + hex + " as a single character term");120 assert.isTrue(/aa\u0345/ui.test("aa" + equivChar), "\\u0345 -> \\u" + hex + " in literal");121 assert.isTrue(/[a\u0345]/ui.test(equivChar), "\\u0345 -> \\u" + hex + " in character set");122 assert.isTrue(/(\u0345)\1/ui.test("\u0345" + equivChar), "\\u0345 -> \\u" + hex + " in back reference");123 });124 }125 }126];127 ...

Full Screen

Full Screen

simcard_dialog_test.js

Source:simcard_dialog_test.js Github

copy

Full Screen

...105 });106 test('null', function() {107 MockIccHelper.setProperty('cardState', null);108 SimPinDialog.handleCardState();109 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);110 assert.isTrue(SimPinDialog.pinArea.hidden);111 assert.isTrue(SimPinDialog.pukArea.hidden);112 assert.isTrue(SimPinDialog.xckArea.hidden);113 assert.isTrue(SimPinDialog.newPinArea.hidden);114 assert.isTrue(SimPinDialog.confirmPinArea.hidden);115 });116 test('unknown', function() {117 MockIccHelper.setProperty('cardState', 'unknown');118 SimPinDialog.handleCardState();119 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);120 assert.isTrue(SimPinDialog.pinArea.hidden);121 assert.isTrue(SimPinDialog.pukArea.hidden);122 assert.isTrue(SimPinDialog.xckArea.hidden);123 assert.isTrue(SimPinDialog.newPinArea.hidden);124 assert.isTrue(SimPinDialog.confirmPinArea.hidden);125 });126 test('ready', function() {127 MockIccHelper.setProperty('cardState', 'ready');128 SimPinDialog.handleCardState();129 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);130 assert.isTrue(SimPinDialog.pinArea.hidden);131 assert.isTrue(SimPinDialog.pukArea.hidden);132 assert.isTrue(SimPinDialog.xckArea.hidden);133 assert.isTrue(SimPinDialog.newPinArea.hidden);134 assert.isTrue(SimPinDialog.confirmPinArea.hidden);135 });136 test('pin required', function() {137 MockIccHelper.setProperty('cardState', 'pinRequired');138 SimPinDialog.handleCardState();139 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);140 assert.isFalse(SimPinDialog.pinArea.hidden);141 assert.isTrue(SimPinDialog.pukArea.hidden);142 assert.isTrue(SimPinDialog.xckArea.hidden);143 assert.isTrue(SimPinDialog.newPinArea.hidden);144 assert.isTrue(SimPinDialog.confirmPinArea.hidden);145 });146 test('puk required', function() {147 MockIccHelper.setProperty('cardState', 'pukRequired');148 SimPinDialog.handleCardState();149 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);150 assert.isTrue(SimPinDialog.pinArea.hidden);151 assert.isFalse(SimPinDialog.pukArea.hidden);152 assert.isTrue(SimPinDialog.xckArea.hidden);153 assert.isFalse(SimPinDialog.newPinArea.hidden);154 assert.isFalse(SimPinDialog.confirmPinArea.hidden);155 });156 test('network locked', function() {157 MockIccHelper.setProperty('cardState', 'networkLocked');158 SimPinDialog.handleCardState();159 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);160 assert.isTrue(SimPinDialog.pinArea.hidden);161 assert.isTrue(SimPinDialog.pukArea.hidden);162 assert.isFalse(SimPinDialog.xckArea.hidden);163 assert.isTrue(SimPinDialog.newPinArea.hidden);164 assert.isTrue(SimPinDialog.confirmPinArea.hidden);165 });166 test('corporate locked', function() {167 MockIccHelper.setProperty('cardState', 'corporateLocked');168 SimPinDialog.handleCardState();169 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);170 assert.isTrue(SimPinDialog.pinArea.hidden);171 assert.isTrue(SimPinDialog.pukArea.hidden);172 assert.isFalse(SimPinDialog.xckArea.hidden);173 assert.isTrue(SimPinDialog.newPinArea.hidden);174 assert.isTrue(SimPinDialog.confirmPinArea.hidden);175 });176 test('service provider locked', function() {177 MockIccHelper.setProperty('cardState', 'serviceProviderLocked');178 SimPinDialog.handleCardState();179 assert.isTrue(SimPinDialog.triesLeftMsg.hidden);180 assert.isTrue(SimPinDialog.pinArea.hidden);181 assert.isTrue(SimPinDialog.pukArea.hidden);182 assert.isFalse(SimPinDialog.xckArea.hidden);183 assert.isTrue(SimPinDialog.newPinArea.hidden);184 assert.isTrue(SimPinDialog.confirmPinArea.hidden);185 });186 });...

Full Screen

Full Screen

SportsQuiz.js

Source:SportsQuiz.js Github

copy

Full Screen

1export const SportsQuestions = {2 3 Questions: [4 {5 question: "¿Que selección gano la Copa Mundial de Fútbol que se celebro en Brasil 2014?",6 answers: [7 { 8 id: "0",9 answer: "Argentina",10 isTrue: false11 },12 {13 id: "1",14 answer: "Brasil",15 isTrue: false16 },17 {18 id: "2",19 answer: "Alemania",20 isTrue: true21 },22 {23 id: "3",24 answer: "Canadá",25 isTrue: false26 }27 ],28 },29 {30 question: "¿Qué selecciones se enfrentaron en la final de México 1986?",31 answers: [32 { 33 id: "0",34 answer: "Argentina y Uruguay",35 isTrue: false36 },37 {38 id: "1",39 answer: "Alemania y Argentina",40 isTrue: true41 },42 {43 id: "2",44 answer: "Brasil y España",45 isTrue: false46 },47 {48 id: "3",49 answer: "Estados Unidos y Brasil",50 isTrue: false51 }52 ],53 },54 {55 question: "¿Cómo se llama en béisbol cuando un bateador golpea la bola y ésta sale del campo de juego, lo que le permite recorrer todas las bases con facilidad?",56 answers: [57 { 58 id: "0",59 answer: "Gol",60 isTrue: false61 },62 {63 id: "1",64 answer: "Strike",65 isTrue: false66 },67 {68 id: "2",69 answer: "Hit",70 isTrue: false71 },72 {73 id: "3",74 answer: "Home run",75 isTrue: true76 }77 ],78 },79 {80 question: "¿Cómo se llama en golf cuando completas un hoyo en un lanzamiento menos que el par del hoyo?",81 answers: [82 { 83 id: "0",84 answer: "Hit",85 isTrue: false86 },87 {88 id: "1",89 answer: "Birdie",90 isTrue: true91 },92 {93 id: "2",94 answer: "Albatros",95 isTrue: false96 },97 {98 id: "3",99 answer: "Eagle",100 isTrue: false101 }102 ],103 },104 {105 question: "¿Con cuántos jugadores en pista juega un equipo de voleibol?",106 answers: [107 { 108 id: "0",109 answer: "6",110 isTrue: true111 },112 {113 id: "1",114 answer: "5",115 isTrue: false116 },117 {118 id: "2",119 answer: "10",120 isTrue: false121 },122 {123 id: "3",124 answer: "4",125 isTrue: false126 }127 ],128 },129 {130 question: "En natación, ¿cuánto mide de largo una piscina de competición para olimpiadas y mundiales?",131 answers: [132 { 133 id: "0",134 answer: "50 metros",135 isTrue: true136 },137 {138 id: "1",139 answer: "70 metros",140 isTrue: false141 },142 {143 id: "2",144 answer: "30 metros",145 isTrue: false146 },147 {148 id: "3",149 answer: "49 metros",150 isTrue: false151 }152 ],153 },154 {155 question: "¿Qué nombre italiano tiene el sistema de juego de un equipo de fútbol que pretende defender a toda costa y renuncia prácticamente al ataque?",156 answers: [157 { 158 id: "0",159 answer: "Biscotto",160 isTrue: false161 },162 {163 id: "1",164 answer: "Fetuccini",165 isTrue: false166 },167 {168 id: "2",169 answer: "Catenaccio",170 isTrue: true171 },172 {173 id: "3",174 answer: "Chiellini",175 isTrue: false176 }177 ],178 },179 {180 question: "¿Cuántos kilómetros se corren aproximadamente en una maratón?",181 answers: [182 { 183 id: "0",184 answer: "42 kilómetros",185 isTrue: true186 },187 {188 id: "1",189 answer: "45 kilómetros",190 isTrue: false191 },192 {193 id: "2",194 answer: "55 kilómetros",195 isTrue: false196 },197 {198 id: "3",199 answer: "35 kilómetros",200 isTrue: false201 }202 ],203 },204 {205 question: "¿A qué distancia está el punto de penalty de la portería en fútbol?",206 answers: [207 { 208 id: "0",209 answer: "9 metros",210 isTrue: false211 },212 {213 id: "1",214 answer: "12 metros",215 isTrue: false216 },217 {218 id: "2",219 answer: "10 metros",220 isTrue: false221 },222 {223 id: "3",224 answer: "11 metros",225 isTrue: true226 }227 ],228 },229 {230 question: "¿A qué altura está la canasta de baloncesto?",231 answers: [232 { 233 id: "0",234 answer: "3,09 metros",235 isTrue: false236 },237 {238 id: "1",239 answer: "3,15 metros",240 isTrue: false241 },242 {243 id: "2",244 answer: "3,05 metros",245 isTrue: true246 },247 {248 id: "3",249 answer: "3 metros",250 isTrue: false251 }252 ],253 }]...

Full Screen

Full Screen

rules.spec.js

Source:rules.spec.js Github

copy

Full Screen

1import rules from '@/utils/validation/rules'2describe('验证项目验证规则的有效性', () => {3 describe('notEmpty验证校验', () => {4 it('空对象校验', () => {5 assert.isTrue(rules().notEmpty.validate({}))6 })7 it('非空字符串校验', () => {8 assert.isTrue(rules().notEmpty.validate('test'))9 })10 it('数字校验', () => {11 assert.isTrue(rules().notEmpty.validate(0))12 })13 it('空字符串校验', () => {14 assert.isFalse(rules().notEmpty.validate(''))15 assert.isFalse(rules().notEmpty.validate(' '))16 })17 it('null对象校验', () => {18 assert.isFalse(rules().notEmpty.validate(null))19 })20 it('undefined对象校验', () => {21 assert.isFalse(rules().notEmpty.validate(undefined))22 })23 })24 describe('email验证校验', () => {25 it('正确的email校验', () => {26 assert.isTrue(rules().email.validate('icourt@icourt.cc'))27 })28 it('错误的email校验', () => {29 assert.isFalse(rules().email.validate('icourt.cc'))30 })31 })32 describe('手机号码验证校验', () => {33 it('正确的phone校验', () => {34 assert.isTrue(rules().phone.validate('+8615800000000'))35 assert.isTrue(rules().phone.validate('+86 15800000000'))36 assert.isTrue(rules().phone.validate('15800000000'))37 })38 it('位数不正确', () => {39 assert.isFalse(rules().phone.validate('15800000'))40 })41 })42 describe('无区号中国手机号码验证校验', () => {43 it('正确的mobile校验', () => {44 assert.isTrue(rules().mobile.validate('15800000000'))45 assert.isTrue(rules().mobile.validate('13300000000'))46 })47 it('格式不正确', () => {48 assert.isFalse(rules().mobile.validate('15800000'))49 assert.isFalse(rules().mobile.validate('1580000ssss'))50 assert.isFalse(rules().mobile.validate('+15800000000'))51 })52 })53 describe('无区号其他地区手机号码验证校验', () => {54 it('正确的otherMobile校验', () => {55 assert.isTrue(rules().otherMobile.validate('15800000000'))56 assert.isTrue(rules().otherMobile.validate('1234'))57 })58 it('格式不正确', () => {59 assert.isFalse(rules().otherMobile.validate('12ss'))60 assert.isFalse(rules().otherMobile.validate('+15800000'))61 })62 })63 describe('onlyNum验证校验', () => {64 it('空数据校验', () => {65 assert.isTrue(rules().onlyNum.validate(''))66 assert.isTrue(rules().onlyNum.validate(undefined))67 assert.isTrue(rules().onlyNum.validate(null))68 })69 it('数字校验', () => {70 assert.isTrue(rules().onlyNum.validate(0))71 assert.isTrue(rules().onlyNum.validate(1))72 })73 it('非数字校验', () => {74 assert.isFalse(rules().onlyNum.validate({}))75 assert.isFalse(rules().onlyNum.validate('"'))76 })77 })78 describe('onlyNumOrAlphabet验证校验', () => {79 it('空数据校验', () => {80 assert.isTrue(rules().onlyNumOrAlphabet.validate(''))81 assert.isTrue(rules().onlyNumOrAlphabet.validate(undefined))82 assert.isTrue(rules().onlyNumOrAlphabet.validate(null))83 })84 it('数字校验', () => {85 assert.isTrue(rules().onlyNumOrAlphabet.validate(0))86 assert.isTrue(rules().onlyNumOrAlphabet.validate(1))87 })88 it('字母校验', () => {89 assert.isTrue(rules().onlyNumOrAlphabet.validate('s'))90 })91 it('非数字字母校验', () => {92 assert.isFalse(rules().onlyNumOrAlphabet.validate({}))93 assert.isFalse(rules().onlyNumOrAlphabet.validate('*'))94 })95 })96 describe('noSpaces验证校验', () => {97 it('空数据校验', () => {98 assert.isTrue(rules().noSpaces.validate(''))99 assert.isTrue(rules().noSpaces.validate(undefined))100 assert.isTrue(rules().noSpaces.validate(null))101 })102 it('存在空格数据校验', () => {103 assert.isFalse(rules().noSpaces.validate('T es t'))104 })105 })106 describe('noEmoji验证校验', () => {107 it('空数据校验', () => {108 assert.isTrue(rules().noEmoji.validate(''))109 assert.isTrue(rules().noEmoji.validate(undefined))110 assert.isTrue(rules().noEmoji.validate(null))111 })112 it('存在Emoji数据校验', () => {113 assert.isFalse(rules().noEmoji.validate('😊'))114 })115 })116 describe('noSpecial验证校验', () => {117 it('空数据校验', () => {118 assert.isTrue(rules().noSpecial.validate(''))119 assert.isTrue(rules().noSpecial.validate(undefined))120 assert.isTrue(rules().noSpecial.validate(null))121 })122 it('特殊字符数据校验', () => {123 assert.isFalse(rules().noSpecial.validate('*'))124 assert.isFalse(rules().noSpecial.validate(':'))125 assert.isFalse(rules().noSpecial.validate('?'))126 assert.isFalse(rules().noSpecial.validate('|'))127 assert.isFalse(rules().noSpecial.validate('<'))128 assert.isFalse(rules().noSpecial.validate('>'))129 assert.isFalse(rules().noSpecial.validate('\\'))130 assert.isFalse(rules().noSpecial.validate('/'))131 assert.isFalse(rules().noSpecial.validate('"'))132 })133 })134 describe('传入多个值校验是否都存在非空非undefined字符串', () => {135 it('传入值正确', () => {136 assert.isTrue(rules().rightParams.validate('a', 'b', 'c'))137 assert.isTrue(rules().rightParams.validate(12, '2', 'abc'))138 })139 it('传入值有误', () => {140 assert.isFalse(rules().rightParams.validate('undefined', 'a'))141 assert.isFalse(rules().rightParams.validate('a', '', 'c'))142 assert.isFalse(rules().rightParams.validate('a', undefined, 'c'))143 assert.isFalse(rules().rightParams.validate('a', null, 'c'))144 })145 })...

Full Screen

Full Screen

test.js

Source:test.js Github

copy

Full Screen

...32 it("adds an element into the tree below this branch", function () {33 node.add(0);34 node.add(2);35 node.add(9);36 assert.isTrue(node.contains(0));37 assert.isTrue(node.contains(2));38 assert.isTrue(node.contains(9));39 });40 });41 describe("contains(element) method", function () {42 it("Checks if this element is contained in this branch", function () {43 node.add(0);44 node.add(2);45 node.add(9);46 assert.isTrue(node.contains(0));47 assert.isTrue(node.contains(2));48 assert.isTrue(node.contains(9));49 });50 });51 describe("remove(parent, element) method", function() {52 it("removes no-child-nodes on the left", function() {53 assert.isTrue(node.remove(null, 1));54 });55 it("removes no-child-nodes on the right", function() {56 assert.isTrue(node.remove(null, 8));57 });58 it("removes one-child-nodes on the left", function() {59 assert.isTrue(node.remove(null, 1));60 assert.isTrue(node.remove(null, 3));61 });62 it("removes one-child-nodes on the right", function() {63 assert.isTrue(node.remove(null, 8));64 assert.isTrue(node.remove(null, 7));65 });66 it("removes two-child-nodes on the left", function() {67 assert.isTrue(node.remove(null, 3));68 });69 it("removes two-child-nodes on the right", function() {70 assert.isTrue(node.remove(null, 7));71 });72 });73});74describe("Binary Search Tree - RootNode", function () {75 let root = new RootNode();76 beforeEach(() => { 77 root = new RootNode(); 78 });79 describe("add(element) method", function () {80 it("The first add() call sets the value on the root", function () {81 root.add("5");82 assert.equal(root.value, 5);83 });84 it("Works like a normal node for other additions", function() {85 root.add(5);86 root.add(3);87 root.add(7);88 root.add(1);89 root.add(4);90 root.add(6);91 root.add(8);92 assert.isTrue(root.contains(5));93 assert.isTrue(root.contains(3));94 assert.isTrue(root.contains(7));95 assert.isTrue(root.contains(1));96 assert.isTrue(root.contains(4));97 assert.isTrue(root.contains(6));98 assert.isTrue(root.contains(8));99 });100 });101 describe("remove(element) method", function () {102 it("sets the value of the root node to null (if it's the only value in the tree) ", () => {103 root.add(5);104 root.remove(5);105 assert.isNull(root.value);106 });107 it("works like a normal node for all other use cases", () => {108 root.add(5);109 root.add(3);110 root.add(7);111 root.add(1);112 root.add(4);113 root.add(6);114 root.add(8);115 assert.isTrue(root.remove(5));116 assert.isTrue(root.remove(3));117 assert.isTrue(root.remove(7));118 assert.isTrue(root.remove(1));119 assert.isTrue(root.remove(4));120 assert.isTrue(root.remove(6));121 assert.isTrue(root.remove(8));122 });123 });124});125describe("BinarySearchTree", function () {126 let bst = new BinarySearchTree();127 beforeEach(() => { 128 bst = new BinarySearchTree(); 129 bst.add(5);130 bst.add(3);131 bst.add(7);132 bst.add(1);133 bst.add(4);134 bst.add(6);135 bst.add(8);136 });137 describe("insertAll(array) method", function () {138 it("adds the array in the bst", function () {139 let array=[10, 20];140 bst.insertAll(array);141 assert.equal(bst.root.right.right.right.value, 10);142 });143 });144 describe("readIntoArray() method", function () {145 it("prints the element of bst in to an array", function () {146 let arr=[];147 arr.push(bst.readIntoArray());148 assert.equal(arr[0], 5);149 });150 });151 describe("min() method", function () {152 it("returns the smallest element in the bst", function () {153 assert.equal(bst.min(), 1);154 });155 });156 describe("add(element) method", function () {157 it("adds elements to the bst (left if needed)", function () {158 bst.add(0);159 assert.equal(bst.root.left.left.left.value, 0);160 });161 it("adds element to the bst (right if needed)", () => {162 bst.add(9);163 assert.equal(bst.root.right.right.right.value, 9);164 });165 });166 describe("contains(element) method", function () {167 it("checks if a elment is in the bst", function () {168 assert.isTrue(bst.contains(3));169 assert.isFalse(bst.contains(10));170 });171 });172 describe("remove(element) method", function () {173 it("removes an elment from the bst", function () {174 assert.isFalse(bst.remove(10));175 assert.isTrue(bst.remove(5));176 assert.isTrue(bst.remove(3));177 assert.isTrue(bst.remove(7));178 assert.isTrue(bst.remove(1));179 assert.isTrue(bst.remove(4));180 assert.isTrue(bst.remove(6));181 assert.isTrue(bst.remove(8));182 });183 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isTrue } = require('playwright/lib/utils/utils');2const { test, expect } = require('@playwright/test');3test('test', async ({ page }) => {4 const text = await page.innerText('text=Get started');5 expect(isTrue(text)).toBe(true);6});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isTrue } = require('playwright/lib/utils/utils');2const { isFalse } = require('playwright/lib/utils/utils');3const { isTrue } = require('playwright/lib/utils/utils');4const { isFalse } = require('playwright/lib/utils/utils');5const { isTrue } = require('playwright/lib/utils/utils');6const { isFalse } = require('playwright/lib/utils/utils');7const { isTrue } = require('playwright/lib/utils/utils');8const { isFalse } = require('playwright/lib/utils/utils');9const { isTrue } = require('playwright/lib/utils/utils');10const { isFalse } = require('playwright/lib/utils/utils');11const { isTrue } = require('playwright/lib/utils/utils');12const { isFalse } = require('playwright/lib/utils/utils');13const { isTrue } = require('playwright/lib/utils/utils');14const { isFalse } = require('playwright/lib/utils/utils');15const { isTrue } = require('playwright/lib/utils/utils');16const { isFalse } = require('playwright/lib/utils/utils');17const { isTrue } = require('playwright/lib/utils/utils');18const { isFalse } = require('playwright/lib/utils/utils');19const { isTrue } = require('playwright/lib

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isTrue } = require('@playwright/test/lib/utils/utils');2const assert = require('assert');3const { isTrue } = require('@playwright/test/lib/utils/utils');4const assert = require('assert');5const { isTrue } = require('@playwright/test/lib/utils/utils');6const assert = require('assert');7const { isTrue } = require('@playwright/test/lib/utils/utils');8const assert = require('assert');9const { isTrue } = require('@playwright/test/lib/utils/utils');10const assert = require('assert');11const { isTrue } = require('@playwright/test/lib/utils/utils');12const assert = require('assert');13const { isTrue } = require('@playwright/test/lib/utils/utils');14const assert = require('assert');15const { isTrue } = require('@playwright/test/lib/utils/utils');16const assert = require('assert');17const { isTrue } = require('@playwright/test/lib/utils/utils');18const assert = require('assert');19const { isTrue } = require('@playwright/test/lib/utils/utils');20const assert = require('assert');21const { isTrue } = require('@playwright/test/lib/utils/utils');22const assert = require('assert');23const { isTrue } = require('@playwright/test/lib/utils/utils');24const assert = require('assert');25const { isTrue } = require('@playwright/test/lib/utils/utils');26const assert = require('assert');27const { isTrue } = require('@playwright/test/lib/utils/utils');28const assert = require('assert');29const { isTrue } = require

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isTrue } = require('playwright/lib/server/utils');2const assert = require('assert');3assert.ok(isTrue('true'));4assert.ok(isTrue('True'));5assert.ok(isTrue('TRUE'));6assert.ok(isTrue('1'));7assert.ok(isTrue('on'));8assert.ok(isTrue('yes'));9assert.ok(isTrue('y'));10assert.ok(isTrue('t'));11assert.ok(isTrue('ok'));12assert.ok(isTrue('okay'));13assert.ok(isTrue('yup'));14assert.ok(isTrue('yep'));15assert.ok(isTrue('sure'));16assert.ok(isTrue('affirmative'));17assert.ok(isTrue('roger'));18assert.ok(isTrue('10'));19assert.ok(isTrue('100'));20assert.ok(isTrue('1000'));21assert.ok(isTrue('10000'));22assert.ok(isTrue('100000'));23assert.ok(isTrue('1000000'));24assert.ok(isTrue('10000000'));25assert.ok(isTrue('100000000'));26assert.ok(isTrue('1000000000'));27assert.ok(isTrue('10000000000'));28assert.ok(isTrue('100000000000'));29assert.ok(isTrue('1000000000000'));30assert.ok(isTrue('10000000000000'));31assert.ok(isTrue('100000000000000'));32assert.ok(isTrue('1000000000000000'));33assert.ok(isTrue('10000000000000000'));34assert.ok(isTrue('100000000000000000'));35assert.ok(isTrue('1000000000000000000'));36assert.ok(isTrue('10000000000000000000'));37assert.ok(isTrue('100000000000000000000'));38assert.ok(isTrue('1000000000000000000000'));39assert.ok(isTrue('10000000000000000000000'));40assert.ok(isTrue('100000000000000000000000'));41assert.ok(isTrue('1000000000000000000000000'));42assert.ok(isTrue('10000000000000000000000000'));43assert.ok(isTrue('100000000000000000000000000'));44assert.ok(isTrue('1000000000000000000000000000'));45assert.ok(isTrue('10000000000000000000000000000'));46assert.ok(isTrue('100000000000000000000000000000'));47assert.ok(isTrue('1000000000000000000000000000000'));48assert.ok(isTrue('100000000000000000

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isTrue } = require('playwright/lib/internal/utils');2if(isTrue(process.env.HEADLESS)) {3 console.log('Headless mode is enabled');4} else {5 console.log('Headless mode is disabled');6}

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isTrue } = require('playwright/lib/utils/utils');2const { expect } = require('chai');3const selector = '.some-selector';4const page = await browser.newPage();5const isSelectorVisible = await isTrue(page, selector);6expect(isSelectorVisible).to.be.true;7const isSelectorHidden = await isTrue(page, selector, 'hidden');8expect(isSelectorHidden).to.be.false;9Contributions are welcome! Please read [CONTRIBUTING.md](

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isTrue } = require('@playwright/test');2const { test, expect } = require('@playwright/test');3test('isTrue', async ({ page }) => {4 expect(await isTrue(true)).toBe(true);5 expect(await isTrue(false)).toBe(false);6 expect(await isTrue('true')).toBe(true);7 expect(await isTrue('false')).toBe(false);8 expect(await isTrue('')).toBe(false);9 expect(await isTrue('0')).toBe(false);10 expect(await isTrue('1')).toBe(true);11 expect(await isTrue(0)).toBe(false);12 expect(await isTrue(1)).toBe(true);13 expect(await isTrue('test')).toBe(true);14 expect(await isTrue('Test')).toBe(true);15 expect(await isTrue('TEST')).toBe(true);16 expect(await isTrue('false')).toBe(false);17 expect(await isTrue('False')).toBe(false);18 expect(await isTrue('FALSE')).toBe(false);19 expect(await isTrue('no')).toBe(false);20 expect(await isTrue('No')).toBe(false);21 expect(await isTrue('NO')).toBe(false);22 expect(await isTrue('yes')).toBe(true);23 expect(await isTrue('Yes')).toBe(true);24 expect(await isTrue('YES')).toBe(true);25 expect(await isTrue('off')).toBe(false);26 expect(await isTrue('Off')).toBe(false);27 expect(await isTrue('OFF')).toBe(false);28 expect(await isTrue('on')).toBe(true);29 expect(await isTrue('On')).toBe(true);30 expect(await isTrue('ON')).toBe(true);31 expect(await isTrue('null')).toBe(false);32 expect(await isTrue('Null')).toBe(false);33 expect(await isTrue('NULL')).toBe(false);34 expect(await isTrue('undefined')).toBe(false);35 expect(await isTrue('Undefined')).toBe(false);36 expect(await isTrue('UNDEFINED')).toBe(false);37 expect(await isTrue('NaN')).toBe(false);38 expect(await isTrue('NAN')).toBe(false);39 expect(await isTrue('nan')).toBe(false);40 expect(await isTrue('nAn')).toBe(false);41 expect(await isTrue('NaN')).toBe(false);42 expect(await isTrue('Nan')).toBe(false);43 expect(await isTrue('nAN')).toBe(false);

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful