ninjs 0.13.6 → 0.13.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/ninjs.gemspec +5 -290
- metadata +52 -345
- data/.bundle/config +0 -2
- data/CNAME +0 -1
- data/Gemfile +0 -16
- data/Gemfile.lock +0 -36
- data/LICENSE +0 -29
- data/README.md +0 -348
- data/bin/ninjs +0 -218
- data/lib/ninjs.rb +0 -10
- data/lib/ninjs/command.rb +0 -91
- data/lib/ninjs/configuration.rb +0 -72
- data/lib/ninjs/dependencies.rb +0 -16
- data/lib/ninjs/generator.rb +0 -57
- data/lib/ninjs/helpers.rb +0 -17
- data/lib/ninjs/manifest.rb +0 -9
- data/lib/ninjs/notification.rb +0 -37
- data/lib/ninjs/project.rb +0 -233
- data/repository/jquery/1.1.4.js +0 -2508
- data/repository/jquery/1.2.6.js +0 -32
- data/repository/jquery/1.3.2.js +0 -19
- data/repository/jquery/1.4.2.js +0 -154
- data/repository/jquery/1.4.3.js +0 -166
- data/repository/jquery/1.4.4.js +0 -167
- data/repository/jquery/1.5.js +0 -16
- data/repository/jquery/fancybox/1.3.1.js +0 -1079
- data/repository/jquery/fancybox/assets/1.3.1/css/fancybox.css +0 -363
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/blank.gif +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_close.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_loading.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_nav_left.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_nav_right.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_e.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_n.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_ne.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_nw.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_s.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_se.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_sw.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_w.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_left.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_main.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_over.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_right.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox-x.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox-y.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/jquery.easing-1.3.pack.js +0 -72
- data/repository/jquery/fancybox/latest.js +0 -1
- data/repository/jquery/latest.js +0 -1
- data/repository/jquery/mobile/1.0a3.js +0 -123
- data/repository/jquery/mobile/1.0a3/assets/css/jquery.mobile.css +0 -1652
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/ajax-loader.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-check-off.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-check-on.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-radio-off.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-radio-on.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icon-search-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-18-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-18-white.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-36-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-36-white.png +0 -0
- data/repository/jquery/mobile/latest.js +0 -1
- data/repository/jquery/mousewheel/3.0.2.js +0 -11
- data/repository/jquery/mousewheel/latest.js +0 -1
- data/repository/jquery/ui/1.8.7.js +0 -783
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.accordion.css +0 -19
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.all.css +0 -11
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.autocomplete.css +0 -53
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.base.css +0 -11
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.button.css +0 -38
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.core.css +0 -41
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.datepicker.css +0 -68
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.dialog.css +0 -21
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.progressbar.css +0 -11
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.resizable.css +0 -20
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.selectable.css +0 -10
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.slider.css +0 -24
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.tabs.css +0 -18
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.theme.css +0 -252
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_222222_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_2e83ff_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_454545_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_888888_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_cd0a0a_256x240.png +0 -0
- data/repository/jquery/ui/latest.js +0 -1
- data/repository/json2.js +0 -482
- data/repository/modernizr/1.5.js +0 -28
- data/repository/modernizr/latest.js +0 -1
- data/repository/ninjs/core/.core.pdoc.yaml +0 -0
- data/repository/ninjs/core/.existence.pdoc.yaml +0 -12
- data/repository/ninjs/core/.extend.pdoc.yaml +0 -0
- data/repository/ninjs/core/.nin.pdoc.yaml +0 -0
- data/repository/ninjs/core/application.js +0 -47
- data/repository/ninjs/core/existence.js +0 -277
- data/repository/ninjs/core/extend.js +0 -77
- data/repository/ninjs/core/module.js +0 -135
- data/repository/ninjs/core/nin.js +0 -4
- data/repository/ninjs/docs/Data/ClassHierarchy.nd +0 -0
- data/repository/ninjs/docs/Data/ConfigFileInfo.nd +0 -0
- data/repository/ninjs/docs/Data/FileInfo.nd +0 -16
- data/repository/ninjs/docs/Data/ImageFileInfo.nd +0 -0
- data/repository/ninjs/docs/Data/ImageReferenceTable.nd +0 -0
- data/repository/ninjs/docs/Data/IndexInfo.nd +0 -0
- data/repository/ninjs/docs/Data/PreviousMenuState.nd +0 -0
- data/repository/ninjs/docs/Data/PreviousSettings.nd +0 -0
- data/repository/ninjs/docs/Data/SymbolTable.nd +0 -0
- data/repository/ninjs/docs/Languages.txt +0 -113
- data/repository/ninjs/docs/Menu.txt +0 -63
- data/repository/ninjs/docs/Topics.txt +0 -81
- data/repository/ninjs/docs/files/core/application-js.html +0 -44
- data/repository/ninjs/docs/files/core/existence-js.html +0 -60
- data/repository/ninjs/docs/files/core/extend-js.html +0 -55
- data/repository/ninjs/docs/files/core/module-js.html +0 -80
- data/repository/ninjs/docs/files/core/nin-js.html +0 -38
- data/repository/ninjs/docs/index.html +0 -1
- data/repository/ninjs/docs/index/Classes.html +0 -33
- data/repository/ninjs/docs/index/Files.html +0 -45
- data/repository/ninjs/docs/index/Functions.html +0 -65
- data/repository/ninjs/docs/index/General.html +0 -85
- data/repository/ninjs/docs/index/Variables.html +0 -45
- data/repository/ninjs/docs/javascript/main.js +0 -841
- data/repository/ninjs/docs/javascript/prettify.js +0 -1526
- data/repository/ninjs/docs/javascript/searchdata.js +0 -152
- data/repository/ninjs/docs/search/ClassesN.html +0 -20
- data/repository/ninjs/docs/search/FilesA.html +0 -20
- data/repository/ninjs/docs/search/FilesE.html +0 -20
- data/repository/ninjs/docs/search/FilesM.html +0 -20
- data/repository/ninjs/docs/search/FilesN.html +0 -20
- data/repository/ninjs/docs/search/FunctionsA.html +0 -20
- data/repository/ninjs/docs/search/FunctionsC.html +0 -20
- data/repository/ninjs/docs/search/FunctionsE.html +0 -20
- data/repository/ninjs/docs/search/FunctionsI.html +0 -20
- data/repository/ninjs/docs/search/FunctionsM.html +0 -20
- data/repository/ninjs/docs/search/FunctionsR.html +0 -20
- data/repository/ninjs/docs/search/FunctionsS.html +0 -20
- data/repository/ninjs/docs/search/FunctionsSymbols.html +0 -20
- data/repository/ninjs/docs/search/FunctionsU.html +0 -20
- data/repository/ninjs/docs/search/GeneralA.html +0 -20
- data/repository/ninjs/docs/search/GeneralC.html +0 -20
- data/repository/ninjs/docs/search/GeneralD.html +0 -20
- data/repository/ninjs/docs/search/GeneralE.html +0 -20
- data/repository/ninjs/docs/search/GeneralF.html +0 -20
- data/repository/ninjs/docs/search/GeneralI.html +0 -20
- data/repository/ninjs/docs/search/GeneralM.html +0 -20
- data/repository/ninjs/docs/search/GeneralN.html +0 -20
- data/repository/ninjs/docs/search/GeneralR.html +0 -20
- data/repository/ninjs/docs/search/GeneralS.html +0 -20
- data/repository/ninjs/docs/search/GeneralSymbols.html +0 -20
- data/repository/ninjs/docs/search/GeneralT.html +0 -20
- data/repository/ninjs/docs/search/GeneralU.html +0 -20
- data/repository/ninjs/docs/search/GeneralV.html +0 -20
- data/repository/ninjs/docs/search/NoResults.html +0 -15
- data/repository/ninjs/docs/search/VariablesD.html +0 -20
- data/repository/ninjs/docs/search/VariablesN.html +0 -20
- data/repository/ninjs/docs/search/VariablesR.html +0 -20
- data/repository/ninjs/docs/search/VariablesT.html +0 -20
- data/repository/ninjs/docs/styles/main.css +0 -828
- data/repository/ninjs/extensions/jquery.elements.js +0 -60
- data/repository/ninjs/tests/index.html +0 -21
- data/repository/ninjs/tests/ninjs.test.js +0 -188
- data/repository/ninjs/tests/ninjs.utilities.test.js +0 -137
- data/repository/ninjs/tests/qunit/qunit.css +0 -197
- data/repository/ninjs/tests/qunit/qunit.js +0 -1415
- data/repository/ninjs/utilities/all.js +0 -5
- data/repository/ninjs/utilities/array.js +0 -29
- data/repository/ninjs/utilities/cookie.js +0 -0
- data/repository/ninjs/utilities/css.js +0 -51
- data/repository/ninjs/utilities/number.js +0 -11
- data/repository/ninjs/utilities/string.js +0 -61
- data/repository/nullconsole.js +0 -7
- data/repository/qunit/assets/css/qunit.css +0 -196
- data/repository/qunit/qunit.js +0 -1374
- data/repository/selectivizr/1.0.js +0 -5
- data/repository/selectivizr/latest.js +0 -1
- data/repository/syntaxhighlighter/all.js +0 -11
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCore.css +0 -226
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDefault.css +0 -328
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDjango.css +0 -331
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEclipse.css +0 -339
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEmacs.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMDUltra.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMidnight.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreRDark.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDefault.css +0 -117
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDjango.css +0 -120
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEclipse.css +0 -128
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEmacs.css +0 -113
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMDUltra.css +0 -113
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMidnight.css +0 -113
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeRDark.css +0 -113
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCore.scss +0 -216
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDefault.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDjango.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEclipse.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEmacs.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreFadeToGrey.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMDUltra.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMidnight.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreRDark.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDefault.scss +0 -7
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDjango.scss +0 -36
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEclipse.scss +0 -48
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEmacs.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeFadeToGrey.scss +0 -36
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMDUltra.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMidnight.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeRDark.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_theme_template.scss +0 -120
- data/repository/syntaxhighlighter/shAutoloader.js +0 -17
- data/repository/syntaxhighlighter/shBrushAS3.js +0 -59
- data/repository/syntaxhighlighter/shBrushAppleScript.js +0 -75
- data/repository/syntaxhighlighter/shBrushBash.js +0 -59
- data/repository/syntaxhighlighter/shBrushCSharp.js +0 -65
- data/repository/syntaxhighlighter/shBrushColdFusion.js +0 -100
- data/repository/syntaxhighlighter/shBrushCpp.js +0 -97
- data/repository/syntaxhighlighter/shBrushCss.js +0 -91
- data/repository/syntaxhighlighter/shBrushDelphi.js +0 -55
- data/repository/syntaxhighlighter/shBrushDiff.js +0 -41
- data/repository/syntaxhighlighter/shBrushErlang.js +0 -52
- data/repository/syntaxhighlighter/shBrushGroovy.js +0 -67
- data/repository/syntaxhighlighter/shBrushJScript.js +0 -52
- data/repository/syntaxhighlighter/shBrushJava.js +0 -57
- data/repository/syntaxhighlighter/shBrushJavaFX.js +0 -58
- data/repository/syntaxhighlighter/shBrushPerl.js +0 -72
- data/repository/syntaxhighlighter/shBrushPhp.js +0 -88
- data/repository/syntaxhighlighter/shBrushPlain.js +0 -33
- data/repository/syntaxhighlighter/shBrushPowerShell.js +0 -74
- data/repository/syntaxhighlighter/shBrushPython.js +0 -64
- data/repository/syntaxhighlighter/shBrushRuby.js +0 -55
- data/repository/syntaxhighlighter/shBrushSass.js +0 -94
- data/repository/syntaxhighlighter/shBrushScala.js +0 -51
- data/repository/syntaxhighlighter/shBrushSql.js +0 -66
- data/repository/syntaxhighlighter/shBrushVb.js +0 -56
- data/repository/syntaxhighlighter/shBrushXml.js +0 -69
- data/repository/syntaxhighlighter/shCore.js +0 -17
- data/repository/syntaxhighlighter/shLegacy.js +0 -17
- data/spec/fixtures/global.js +0 -7
- data/spec/fixtures/global.module.js +0 -7
- data/spec/fixtures/myapplication.js +0 -576
- data/spec/fixtures/nin.js +0 -573
- data/spec/fixtures/ninjs.conf +0 -6
- data/spec/fixtures/test.elements.js +0 -4
- data/spec/fixtures/test.js +0 -15
- data/spec/fixtures/test.model.js +0 -3
- data/spec/fixtures/test.module.js +0 -10
- data/spec/fixtures/updated.myapplication.js +0 -27
- data/spec/fixtures/utilities.js +0 -162
- data/spec/helpers_spec.rb +0 -11
- data/spec/integration_spec.rb +0 -257
- data/spec/manifest_spec.rb +0 -8
- data/spec/ninjs_spec.rb +0 -36
- data/spec/notification_spec.rb +0 -27
- data/spec/spec_helper.rb +0 -5
- data/tmp/ff9e83aa019b712b90200b8d1b8fa0c7e14576af.json +0 -1
- data/tmp/metric_fu/_data/20110305.yml +0 -1548
- data/tmp/metric_fu/output/bluff-min.js +0 -1
- data/tmp/metric_fu/output/excanvas.js +0 -35
- data/tmp/metric_fu/output/js-class.js +0 -1
- data/tmp/metric_fu/output/lib_ninjs_dependencies.rb.html +0 -34
- data/tmp/metric_fu/output/lib_ninjs_helpers.rb.html +0 -34
- data/tmp/metric_fu/output/lib_ninjs_manifest.rb.html +0 -27
- data/tmp/metric_fu/output/rails_best_practices.js +0 -11
- data/tmp/metric_fu/scratch/rcov/rcov.txt +0 -1
@@ -1,60 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
NinjsModule.prototype.elements = function(elements, force) {
|
3
|
-
var self = this;
|
4
|
-
|
5
|
-
unless(is_defined(force), function() {
|
6
|
-
force = false;
|
7
|
-
});
|
8
|
-
|
9
|
-
if (is_string(elements)) {
|
10
|
-
var key = elements;
|
11
|
-
if (is_undefined(self.dom[key])) {
|
12
|
-
throw new SyntaxError("NinjsModule.elements('" + key + "'): " + self.name + ".dom." + key + " is undefined");
|
13
|
-
}
|
14
|
-
|
15
|
-
if (is_string(self.dom[key])) {
|
16
|
-
var selection = $(self.dom[key]);
|
17
|
-
|
18
|
-
unless(selection.length === 0, function() {
|
19
|
-
return self.dom[key] = selection;
|
20
|
-
}, function() {
|
21
|
-
return self.dom[key];
|
22
|
-
});
|
23
|
-
}
|
24
|
-
else {
|
25
|
-
if (self.dom[key].length === 0 || force) {
|
26
|
-
|
27
|
-
var return_obj = undefined;
|
28
|
-
|
29
|
-
if (is_string(force)) {
|
30
|
-
var selector = self.dom[key].selector;
|
31
|
-
self.dom[key] = $(force).find(selector);
|
32
|
-
self.dom[key].selector = selector;
|
33
|
-
|
34
|
-
return_obj = self.dom[key];
|
35
|
-
}
|
36
|
-
|
37
|
-
var selection = $(self.dom[key].selector);
|
38
|
-
|
39
|
-
unless(selection.length === 0, function() {
|
40
|
-
return_obj = selection;
|
41
|
-
});
|
42
|
-
|
43
|
-
return return_obj;
|
44
|
-
}
|
45
|
-
else {
|
46
|
-
return self.dom[key];
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
else if (is_typeof(Object, elements)) {
|
51
|
-
self.call_on_ready(function() {
|
52
|
-
for(var key in elements) {
|
53
|
-
if (elements.hasOwnProperty(key)) {
|
54
|
-
self.dom[key] = elements[key];
|
55
|
-
}
|
56
|
-
}
|
57
|
-
});
|
58
|
-
}
|
59
|
-
};
|
60
|
-
})(jQuery);
|
@@ -1,21 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<head>
|
3
|
-
<title>All Ninjs tests</title>
|
4
|
-
|
5
|
-
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen"/>
|
6
|
-
|
7
|
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
|
8
|
-
<script src="qunit/qunit.js"></script>
|
9
|
-
|
10
|
-
<script src="../lib/nin.js"></script>
|
11
|
-
<script src="../lib/utilities.js"></script>
|
12
|
-
|
13
|
-
<script src="ninjs.test.js"></script>
|
14
|
-
<script src="ninjs.utilities.test.js"></script>
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
<h1 id="qunit-header">Ninjs tests</h1>
|
18
|
-
<h2 id="qunit-banner"></h2>
|
19
|
-
<h2 id="qunit-userAgent"></h2>
|
20
|
-
<ol id="qunit-tests"></ol>
|
21
|
-
</body>
|
@@ -1,188 +0,0 @@
|
|
1
|
-
module("existence tests");
|
2
|
-
|
3
|
-
test("existence sanity check", function() {
|
4
|
-
ok(is_defined !== undefined, 'is_defined is defined');
|
5
|
-
ok(is_undefined !== undefined, 'is_undefined is defined');
|
6
|
-
ok(is_typeof !== undefined, 'is_typeof is defined');
|
7
|
-
});
|
8
|
-
|
9
|
-
test("can test for existence", function() {
|
10
|
-
var nonexistent;
|
11
|
-
var existent = 'I think';
|
12
|
-
equals(is_defined(existent), true, 'existent variable is_defined');
|
13
|
-
equals(is_defined(nonexistent), false, 'non-existent variable does not exist');
|
14
|
-
});
|
15
|
-
|
16
|
-
test("can test for non-existence", function() {
|
17
|
-
var existent = 'I think';
|
18
|
-
var nonexistent;
|
19
|
-
equals(is_undefined(nonexistent), true, 'non-existent variable does not exist');
|
20
|
-
equals(is_undefined(existent), false, 'existent variable does exist');
|
21
|
-
});
|
22
|
-
|
23
|
-
test("can check the type strictly with is_typeof", function() {
|
24
|
-
var foo = function(){};
|
25
|
-
var bar = {
|
26
|
-
name: 'SomeObject',
|
27
|
-
method: function() {}
|
28
|
-
};
|
29
|
-
var SomeClass = function(){};
|
30
|
-
var some_instance = new SomeClass();
|
31
|
-
equals(is_typeof(Number, 4), true, 'can check against Number');
|
32
|
-
equals(is_typeof(String, 'Hello World'), true, 'can check against String');
|
33
|
-
equals(is_typeof(Array, ['one', 'two', 'three']), true, 'can check against Array');
|
34
|
-
equals(is_typeof(Function, foo), true, 'can check against Function');
|
35
|
-
equals(is_typeof(Object, bar), true, 'can check against Object');
|
36
|
-
equals(is_typeof(RegExp, /pattern/), true, 'can check against Regexp');
|
37
|
-
equals(is_typeof(SomeClass, some_instance), true, 'can check against custom object');
|
38
|
-
});
|
39
|
-
|
40
|
-
module("typeof proxys");
|
41
|
-
|
42
|
-
test("can check for default types", function() {
|
43
|
-
var today = new Date();
|
44
|
-
var easy_as = [1,2,3];
|
45
|
-
var pattern = new RegExp(/pattern/);
|
46
|
-
|
47
|
-
ok(is_string('hello'), 'hello is_string');
|
48
|
-
ok(is_number(42), '42 is_number');
|
49
|
-
ok(is_array(easy_as), 'easy_as is_array');
|
50
|
-
ok(is_bool(false), 'false is_bool');
|
51
|
-
ok(is_date(today), 'today is_date');
|
52
|
-
ok(is_regex(pattern), 'pattern is_regex');
|
53
|
-
|
54
|
-
equals(is_regex('hello'), false, 'hello fails is_regex');
|
55
|
-
equals(is_date(42), false, '42 fails is_date');
|
56
|
-
equals(is_bool(easy_as), false, 'easy_as fails is_bool');
|
57
|
-
equals(is_array(today), false, 'today fails is_array');
|
58
|
-
equals(is_number(true), false, 'true fails is_number');
|
59
|
-
equals(is_string(pattern), false, 'pattern fails is_string');
|
60
|
-
});
|
61
|
-
|
62
|
-
test("can determine a number", function() {
|
63
|
-
ok(is_numeric(2), '2 is a number');
|
64
|
-
ok(is_numeric(-2), '-2 is a number');
|
65
|
-
ok(is_numeric(45.6), '45.6 is a number');
|
66
|
-
ok(is_numeric(-45.6), '-45.6 is a number');
|
67
|
-
equals(is_numeric('45.6'), true, "'45.6 is a number'");
|
68
|
-
equals(is_numeric('Hello'), false, 'Hello is not a number');
|
69
|
-
});
|
70
|
-
|
71
|
-
module("extend tests");
|
72
|
-
|
73
|
-
test("can add a method to the prototype", function() {
|
74
|
-
ok(is_defined(Function.prototype.method), "Object.prototype.method is defined");
|
75
|
-
|
76
|
-
String.method('test_method', function() {
|
77
|
-
return 'This is a test';
|
78
|
-
});
|
79
|
-
|
80
|
-
equals('Hello'.test_method(), 'This is a test', 'can create a prototype method with method');
|
81
|
-
});
|
82
|
-
|
83
|
-
test("can test a condition with unless", function() {
|
84
|
-
var is_true = false;
|
85
|
-
|
86
|
-
unless (false,
|
87
|
-
function() {
|
88
|
-
is_true = true;
|
89
|
-
}
|
90
|
-
);
|
91
|
-
|
92
|
-
ok(is_true, "unless works");
|
93
|
-
|
94
|
-
var does_fallback_work = false;
|
95
|
-
|
96
|
-
unless (true,
|
97
|
-
function() {
|
98
|
-
|
99
|
-
},
|
100
|
-
function() {
|
101
|
-
does_fallback_work = true;
|
102
|
-
}
|
103
|
-
);
|
104
|
-
|
105
|
-
ok(does_fallback_work, 'fallback works');
|
106
|
-
});
|
107
|
-
|
108
|
-
module("Ninjs application tests");
|
109
|
-
|
110
|
-
test("can create a ninjs application object", function() {
|
111
|
-
var testapp = new NinjsApplication();
|
112
|
-
ok(is_defined(testapp), 'testapp is defined');
|
113
|
-
ok(is_typeof(NinjsApplication, testapp), 'testapp is a valid NinjsApplication');
|
114
|
-
});
|
115
|
-
|
116
|
-
test("can create a NinjsModule", function() {
|
117
|
-
var testapp = new NinjsApplication();
|
118
|
-
testapp.add_module('testmodule');
|
119
|
-
ok(is_defined(testapp.testmodule), 'testapp.testmodule is defined');
|
120
|
-
ok(is_typeof(NinjsModule, testapp.testmodule), 'testapp.testmodule is a valid NinjsModule');
|
121
|
-
});
|
122
|
-
|
123
|
-
module('Ninjs Module tests');
|
124
|
-
|
125
|
-
test("module defaults", function() {
|
126
|
-
var testapp = new NinjsApplication();
|
127
|
-
testapp.add_module('testmodule');
|
128
|
-
|
129
|
-
// properties
|
130
|
-
ok(is_defined(testapp.testmodule.run_tests), 'testapp.testmodule.run_tests is defined');
|
131
|
-
equals(testapp.testmodule.run_tests, false, 'testapp.testmodule.run_tests defaults to false');
|
132
|
-
ok(is_defined(testapp.testmodule.data), "testapp.testmodule.data is defined");
|
133
|
-
ok(is_defined(testapp.testmodule.name), 'testapp.testmodule.name is defined');
|
134
|
-
equals(testapp.testmodule.name, 'testmodule', 'testapp.testmodule.name is correct');
|
135
|
-
ok(is_defined(testapp.testmodule.tests), 'testapp.testmodule.tests is defined');
|
136
|
-
ok(is_array(testapp.testmodule.tests), 'testapp.testmodule.tests is_array');
|
137
|
-
ok(testapp.testmodule.tests.is_empty(), 'testapp.testmodule.tests is empty');
|
138
|
-
ok(is_defined(app), 'app is defined');
|
139
|
-
|
140
|
-
// methods
|
141
|
-
ok(is_defined(testapp.testmodule.actions), 'testapp.testmodule.actions is defined');
|
142
|
-
ok(is_typeof(Function, testapp.testmodule.actions), "testapp.testmodule.actions is a valid Function");
|
143
|
-
ok(is_defined(testapp.testmodule.run), 'testapp.testmodule.run is defined');
|
144
|
-
ok(is_typeof(Function, testapp.testmodule.run), "testapp.testmodule.run is a valid Function");
|
145
|
-
ok(is_defined(testapp.testmodule.call_on_ready), 'testmodule.testapp.call_on_ready is defined');
|
146
|
-
ok(is_defined(testapp.testmodule.execute), 'testmodule.testapp.execute is defined');
|
147
|
-
ok(is_defined(testapp.testmodule.elements), 'testapp.testmodule.elements is defined');
|
148
|
-
ok(is_defined(testapp.testmodule.set_data), 'testapp.testmodule.set_data is defined');
|
149
|
-
});
|
150
|
-
|
151
|
-
test("add_module returns the created module", function() {
|
152
|
-
var testapp = new NinjsApplication();
|
153
|
-
var module = testapp.add_module('some_module');
|
154
|
-
equals(module, testapp.some_module, 'hey');
|
155
|
-
});
|
156
|
-
|
157
|
-
// Qunit waits for DOM to load before running tests
|
158
|
-
// to test DOM wait feature, we need to run some code outside the tests
|
159
|
-
(function() {
|
160
|
-
var testapp = new NinjsApplication();
|
161
|
-
testapp.add_module('testmodule');
|
162
|
-
testapp.testmodule.actions = function() {
|
163
|
-
// append an element to be sure the DOM is ready for manipulation and test for the element's existence
|
164
|
-
$('body').append('<div id="made-by-actions"/>');
|
165
|
-
|
166
|
-
test("Ninjs module can run actions", function() {
|
167
|
-
equals($('#made-by-actions').length, 1,'testapp.test.actions ran after DOM was ready');
|
168
|
-
});
|
169
|
-
};
|
170
|
-
|
171
|
-
testapp.testmodule.run();
|
172
|
-
}());
|
173
|
-
|
174
|
-
// Qunit waits for DOM to load before running tests
|
175
|
-
// to test DOM wait feature, we need to run some code outside the tests
|
176
|
-
(function() {
|
177
|
-
var testapp = new NinjsApplication();
|
178
|
-
testapp.add_module('testmodule');
|
179
|
-
testapp.testmodule.elements(function() {
|
180
|
-
testapp.testmodule.qunit_header = $('#qunit-header');
|
181
|
-
testapp.testmodule.qunit_banner = $('#qunit-banner');
|
182
|
-
|
183
|
-
test('Ninjs module can cache elements', function() {
|
184
|
-
equals(testapp.testmodule.qunit_header[0].tagName, 'H1', '#qunit-header returns an h1');
|
185
|
-
equals(testapp.testmodule.qunit_banner[0].tagName, 'H2', '#qunit-banner returns an h2');
|
186
|
-
});
|
187
|
-
});
|
188
|
-
}());
|
@@ -1,137 +0,0 @@
|
|
1
|
-
module("array utility tests");
|
2
|
-
|
3
|
-
test("can test for emptiness", function() {
|
4
|
-
expect(4);
|
5
|
-
|
6
|
-
ok([].is_empty(), "[].is_empty() is true");
|
7
|
-
equals(['one', 'two', 'three'].is_empty(), false, "['one', 'two', 'three'].is_empty()");
|
8
|
-
ok(['one', 'two', 'three'].not_empty(), "['one', 'two', 'three'].not_empty() is false");
|
9
|
-
equals([].not_empty(), false, "[].not_empty() is false");
|
10
|
-
});
|
11
|
-
|
12
|
-
test("can iterate over each element", function() {
|
13
|
-
expect(7);
|
14
|
-
|
15
|
-
var iteration_count = 0;
|
16
|
-
var test_array_values = [];
|
17
|
-
var test_array_indices = [];
|
18
|
-
|
19
|
-
['one', 'two', 'three'].each(function(value, index) {
|
20
|
-
iteration_count++;
|
21
|
-
test_array_values.push(value);
|
22
|
-
test_array_indices.push(index);
|
23
|
-
});
|
24
|
-
|
25
|
-
equals(test_array_values[0], 'one', 'value at index 0 is correct');
|
26
|
-
equals(test_array_values[1], 'two', 'value at index 1 is correct');
|
27
|
-
equals(test_array_values[2], 'three', 'value at index 2 is correct');
|
28
|
-
|
29
|
-
equals(test_array_indices[0], 0, 'first index is correct');
|
30
|
-
equals(test_array_indices[1], 1, 'second index is correct');
|
31
|
-
equals(test_array_indices[2], 2, 'third index is correct');
|
32
|
-
|
33
|
-
equals(iteration_count, 3, 'made only three iterations');
|
34
|
-
});
|
35
|
-
|
36
|
-
test("can test if an array contains an element", function() {
|
37
|
-
var array = ['one', 'two', 'three'];
|
38
|
-
var string = 'hello';
|
39
|
-
var object = {
|
40
|
-
name: 'some object'
|
41
|
-
};
|
42
|
-
var number = 45;
|
43
|
-
var date = new Date();
|
44
|
-
|
45
|
-
var test_array = [array, string, object, number, date];
|
46
|
-
|
47
|
-
ok(test_array.contains(array), 'array.contains(array)');
|
48
|
-
ok(test_array.contains(string), 'array.contains(string)');
|
49
|
-
ok(test_array.contains(object), 'array.contains(object)');
|
50
|
-
ok(test_array.contains(number), 'array.contains(number)');
|
51
|
-
ok(test_array.contains(date), 'array.contains(date)');
|
52
|
-
equals(test_array.contains('not in there'), false, 'non-existent value is false');
|
53
|
-
});
|
54
|
-
|
55
|
-
module("string utility tests");
|
56
|
-
|
57
|
-
test("can test for emptiness", function() {
|
58
|
-
ok(''.is_empty(), "''.is_empty() is true");
|
59
|
-
equals('hey there'.is_empty(), false, "'hey there'.is_empty() is false");
|
60
|
-
ok('hey there'.not_empty(), "'hey there'.not_empty() is false");
|
61
|
-
equals(''.not_empty(), false, "''.not_empty() is false");
|
62
|
-
});
|
63
|
-
|
64
|
-
test('can test for number', function() {
|
65
|
-
equals('34'.is_numeric(), true, "34 is numeric");
|
66
|
-
equals('0.5'.is_numeric(), true, ".5 is numeric");
|
67
|
-
equals('-34'.is_numeric(), true, '-34 is numeric');
|
68
|
-
equals('-0.5'.is_numeric(), true, '-.05 is numeric');
|
69
|
-
equals('hello'.is_numeric(), false, 'hello is numeric');
|
70
|
-
});
|
71
|
-
|
72
|
-
test('can trim a string', function() {
|
73
|
-
equals(' hello '.trim(), 'hello', "' hello '.trim()");
|
74
|
-
equals(' hello '.ltrim(), 'hello ', "' hello '.ltrim()");
|
75
|
-
equals(' hello '.rtrim(), ' hello', "' hello '.rtrim()");
|
76
|
-
});
|
77
|
-
|
78
|
-
test("can iterate over each character", function() {
|
79
|
-
var iteration_count = 0;
|
80
|
-
var test_chars = [];
|
81
|
-
var test_indices = [];
|
82
|
-
'123'.each(function(character, index) {
|
83
|
-
test_chars.push(character);
|
84
|
-
test_indices.push(index);
|
85
|
-
iteration_count++;
|
86
|
-
});
|
87
|
-
|
88
|
-
equals(test_chars[0], '1', 'first character of 123 is 1');
|
89
|
-
equals(test_chars[1], '2', 'second character of 123 is 2');
|
90
|
-
equals(test_chars[2], '3', 'second character of 123 is 3');
|
91
|
-
|
92
|
-
equals(test_indices[0], 0, 'first index is correct');
|
93
|
-
equals(test_indices[1], 1, 'second index is correct');
|
94
|
-
equals(test_indices[2], 2, 'third index is correct');
|
95
|
-
|
96
|
-
equals(iteration_count, 3, 'made only three iterations');
|
97
|
-
});
|
98
|
-
|
99
|
-
test('can capitalize a string', function() {
|
100
|
-
equals('hello world'.capitalize(), 'Hello world', 'capitalized string correctly');
|
101
|
-
});
|
102
|
-
|
103
|
-
test('can reverse a string', function() {
|
104
|
-
equals('hello world'.reverse(), 'dlrow olleh', 'reversed string correctly');
|
105
|
-
equals('satan oscillate my metallic sonatas'.reverse(), 'satanos cillatem ym etallicso natas', 'fucking palindromes, how do they work?');
|
106
|
-
});
|
107
|
-
|
108
|
-
test("can convert to number", function() {
|
109
|
-
var whole_number = '32';
|
110
|
-
var decimal = '0.08';
|
111
|
-
var negative_number = '-32';
|
112
|
-
var negative_float = '-0.08';
|
113
|
-
|
114
|
-
same(whole_number.to_n(), 32, "whole_number.to_n() is 32");
|
115
|
-
same(decimal.to_n(), 0.08, "decimal.to_n() is 0.08");
|
116
|
-
same(negative_number.to_n(), -32, "negative_number.to_n() is -32");
|
117
|
-
same(negative_float.to_n(), -0.08, "negative_float.to_n() -0.08");
|
118
|
-
});
|
119
|
-
|
120
|
-
test("can pluck a string", function() {
|
121
|
-
equals('one, two, three'.pluck(','), 'one two three', "'one, two, three'.pluck(',')");
|
122
|
-
});
|
123
|
-
|
124
|
-
test("can single space a string", function() {
|
125
|
-
var hard_space = 'one two three four five six';
|
126
|
-
var soft_space = 'one two three four five six';
|
127
|
-
var mixed_space = 'one two three four five six';
|
128
|
-
|
129
|
-
equals(hard_space.single_space(), 'one two three four five six', 'correctly spaced ');
|
130
|
-
equals(soft_space.single_space(), 'one two three four five six', "correctly spaced soft spaces");
|
131
|
-
equals(mixed_space.single_space(), 'one two three four five six', "correctly spaced mixed spaces");
|
132
|
-
});
|
133
|
-
|
134
|
-
test("can compress a string", function() {
|
135
|
-
var string = "satan\n\t oscillate\n\t my\n\t metallic\n sonatas";
|
136
|
-
same(string.compress(), 'satanoscillatemymetallicsonatas', "string is compressed correctly");
|
137
|
-
});
|
@@ -1,197 +0,0 @@
|
|
1
|
-
/** Font Family and Sizes */
|
2
|
-
|
3
|
-
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
4
|
-
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
|
5
|
-
}
|
6
|
-
|
7
|
-
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
8
|
-
#qunit-tests { font-size: smaller; }
|
9
|
-
|
10
|
-
|
11
|
-
/** Resets */
|
12
|
-
|
13
|
-
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
|
14
|
-
margin: 0;
|
15
|
-
padding: 0;
|
16
|
-
}
|
17
|
-
|
18
|
-
|
19
|
-
/** Header */
|
20
|
-
|
21
|
-
#qunit-header {
|
22
|
-
padding: 0.5em 0 0.5em 1em;
|
23
|
-
|
24
|
-
color: #8699a4;
|
25
|
-
background-color: #0d3349;
|
26
|
-
|
27
|
-
font-size: 1.5em;
|
28
|
-
line-height: 1em;
|
29
|
-
font-weight: normal;
|
30
|
-
|
31
|
-
border-radius: 15px 15px 0 0;
|
32
|
-
-moz-border-radius: 15px 15px 0 0;
|
33
|
-
-webkit-border-top-right-radius: 15px;
|
34
|
-
-webkit-border-top-left-radius: 15px;
|
35
|
-
}
|
36
|
-
|
37
|
-
#qunit-header a {
|
38
|
-
text-decoration: none;
|
39
|
-
color: #c2ccd1;
|
40
|
-
}
|
41
|
-
|
42
|
-
#qunit-header a:hover,
|
43
|
-
#qunit-header a:focus {
|
44
|
-
color: #fff;
|
45
|
-
}
|
46
|
-
|
47
|
-
#qunit-banner {
|
48
|
-
height: 5px;
|
49
|
-
}
|
50
|
-
|
51
|
-
#qunit-testrunner-toolbar {
|
52
|
-
padding: 0.5em 0 0.5em 2em;
|
53
|
-
color: #5E740B;
|
54
|
-
background-color: #eee;
|
55
|
-
}
|
56
|
-
|
57
|
-
#qunit-userAgent {
|
58
|
-
padding: 0.5em 0 0.5em 2.5em;
|
59
|
-
background-color: #2b81af;
|
60
|
-
color: #fff;
|
61
|
-
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
62
|
-
}
|
63
|
-
|
64
|
-
|
65
|
-
/** Tests: Pass/Fail */
|
66
|
-
|
67
|
-
#qunit-tests {
|
68
|
-
list-style-position: inside;
|
69
|
-
}
|
70
|
-
|
71
|
-
#qunit-tests li {
|
72
|
-
padding: 0.4em 0.5em 0.4em 2.5em;
|
73
|
-
border-bottom: 1px solid #fff;
|
74
|
-
list-style-position: inside;
|
75
|
-
}
|
76
|
-
|
77
|
-
#qunit-tests li strong {
|
78
|
-
cursor: pointer;
|
79
|
-
}
|
80
|
-
|
81
|
-
#qunit-tests ol {
|
82
|
-
margin-top: 0.5em;
|
83
|
-
padding: 0.5em;
|
84
|
-
|
85
|
-
background-color: #fff;
|
86
|
-
|
87
|
-
border-radius: 15px;
|
88
|
-
-moz-border-radius: 15px;
|
89
|
-
-webkit-border-radius: 15px;
|
90
|
-
|
91
|
-
box-shadow: inset 0px 2px 13px #999;
|
92
|
-
-moz-box-shadow: inset 0px 2px 13px #999;
|
93
|
-
-webkit-box-shadow: inset 0px 2px 13px #999;
|
94
|
-
}
|
95
|
-
|
96
|
-
#qunit-tests table {
|
97
|
-
border-collapse: collapse;
|
98
|
-
margin-top: .2em;
|
99
|
-
}
|
100
|
-
|
101
|
-
#qunit-tests th {
|
102
|
-
text-align: right;
|
103
|
-
vertical-align: top;
|
104
|
-
padding: 0 .5em 0 0;
|
105
|
-
}
|
106
|
-
|
107
|
-
#qunit-tests td {
|
108
|
-
vertical-align: top;
|
109
|
-
}
|
110
|
-
|
111
|
-
#qunit-tests pre {
|
112
|
-
margin: 0;
|
113
|
-
white-space: pre-wrap;
|
114
|
-
word-wrap: break-word;
|
115
|
-
}
|
116
|
-
|
117
|
-
#qunit-tests del {
|
118
|
-
background-color: #e0f2be;
|
119
|
-
color: #374e0c;
|
120
|
-
text-decoration: none;
|
121
|
-
}
|
122
|
-
|
123
|
-
#qunit-tests ins {
|
124
|
-
background-color: #ffcaca;
|
125
|
-
color: #500;
|
126
|
-
text-decoration: none;
|
127
|
-
}
|
128
|
-
|
129
|
-
/*** Test Counts */
|
130
|
-
|
131
|
-
#qunit-tests b.counts { color: black; }
|
132
|
-
#qunit-tests b.passed { color: #5E740B; }
|
133
|
-
#qunit-tests b.failed { color: #710909; }
|
134
|
-
|
135
|
-
#qunit-tests li li {
|
136
|
-
margin: 0.5em;
|
137
|
-
padding: 0.4em 0.5em 0.4em 0.5em;
|
138
|
-
background-color: #fff;
|
139
|
-
border-bottom: none;
|
140
|
-
list-style-position: inside;
|
141
|
-
}
|
142
|
-
|
143
|
-
/*** Passing Styles */
|
144
|
-
|
145
|
-
#qunit-tests li li.pass {
|
146
|
-
color: #5E740B;
|
147
|
-
background-color: #fff;
|
148
|
-
border-left: 26px solid #C6E746;
|
149
|
-
}
|
150
|
-
|
151
|
-
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
152
|
-
#qunit-tests .pass .test-name { color: #366097; }
|
153
|
-
|
154
|
-
#qunit-tests .pass .test-actual,
|
155
|
-
#qunit-tests .pass .test-expected { color: #999999; }
|
156
|
-
|
157
|
-
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
158
|
-
|
159
|
-
/*** Failing Styles */
|
160
|
-
|
161
|
-
#qunit-tests li li.fail {
|
162
|
-
color: #710909;
|
163
|
-
background-color: #fff;
|
164
|
-
border-left: 26px solid #EE5757;
|
165
|
-
}
|
166
|
-
|
167
|
-
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
|
168
|
-
#qunit-tests .fail .test-name,
|
169
|
-
#qunit-tests .fail .module-name { color: #000000; }
|
170
|
-
|
171
|
-
#qunit-tests .fail .test-actual { color: #EE5757; }
|
172
|
-
#qunit-tests .fail .test-expected { color: green; }
|
173
|
-
|
174
|
-
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
175
|
-
|
176
|
-
|
177
|
-
/** Footer */
|
178
|
-
|
179
|
-
#qunit-testresult {
|
180
|
-
padding: 0.5em 0.5em 0.5em 2.5em;
|
181
|
-
|
182
|
-
color: #2b81af;
|
183
|
-
background-color: #D2E0E6;
|
184
|
-
|
185
|
-
border-radius: 0 0 15px 15px;
|
186
|
-
-moz-border-radius: 0 0 15px 15px;
|
187
|
-
-webkit-border-bottom-right-radius: 15px;
|
188
|
-
-webkit-border-bottom-left-radius: 15px;
|
189
|
-
}
|
190
|
-
|
191
|
-
/** Fixture */
|
192
|
-
|
193
|
-
#qunit-fixture {
|
194
|
-
position: absolute;
|
195
|
-
top: -10000px;
|
196
|
-
left: -10000px;
|
197
|
-
}
|