hyhyhy 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +184 -0
- data/Rakefile +2 -0
- data/bin/hyhyhy +59 -0
- data/hyhyhy.gemspec +29 -0
- data/lib/hyhyhy.rb +101 -0
- data/lib/hyhyhy/config.rb +29 -0
- data/lib/hyhyhy/frames.rb +108 -0
- data/lib/hyhyhy/logger.rb +40 -0
- data/lib/hyhyhy/parser.rb +9 -0
- data/lib/hyhyhy/structure/.bowerrc +5 -0
- data/lib/hyhyhy/structure/.hyhyhy +5 -0
- data/lib/hyhyhy/structure/README.md +0 -0
- data/lib/hyhyhy/structure/_assets/javascripts/main.js +395 -0
- data/lib/hyhyhy/structure/_assets/stylesheets/main.css +520 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/.bower.json +47 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/Gruntfile.js +472 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/LICENSE +21 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/README.md +129 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/bower.json +38 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.css +470 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.min.css +5 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.css +6332 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.min.css +5 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/bootstrap.js +2320 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/npm.js +13 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.svg +229 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/.jshintrc +7 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-commonjs-generator.js +23 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-lessdoc-parser.js +238 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-raw-files-generator.js +46 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/configBridge.json +44 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/sauce_browsers.yml +82 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/.jscsrc +34 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/.jshintrc +15 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/affix.js +162 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/alert.js +94 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/button.js +116 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/carousel.js +240 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/collapse.js +211 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/dropdown.js +161 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/modal.js +324 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/popover.js +119 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/scrollspy.js +175 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/tab.js +153 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/tooltip.js +478 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/transition.js +59 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/.csscomb.json +304 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/.csslintrc +19 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/alerts.less +68 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/badges.less +61 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/bootstrap.less +50 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/breadcrumbs.less +26 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/button-groups.less +243 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/buttons.less +160 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/carousel.less +267 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/close.less +33 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/code.less +69 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/component-animations.less +34 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/dropdowns.less +213 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/forms.less +546 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/glyphicons.less +234 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/grid.less +84 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/input-groups.less +166 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/jumbotron.less +49 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/labels.less +64 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/list-group.less +124 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/media.less +47 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins.less +39 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/alerts.less +14 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/background-variant.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/border-radius.less +18 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/buttons.less +52 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/center-block.less +7 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/clearfix.less +22 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/forms.less +85 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/gradients.less +59 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/grid-framework.less +91 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/grid.less +122 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/hide-text.less +21 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/image.less +33 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/labels.less +12 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/list-group.less +29 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/nav-divider.less +10 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/nav-vertical-align.less +9 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/opacity.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/pagination.less +23 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/panels.less +24 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/progress-bar.less +10 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/reset-filter.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/resize.less +6 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/responsive-visibility.less +15 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/size.less +10 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/tab-focus.less +9 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/table-row.less +28 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/text-emphasis.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/text-overflow.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/vendor-prefixes.less +227 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/modals.less +148 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/navbar.less +660 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/navs.less +244 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/normalize.less +427 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/pager.less +54 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/pagination.less +88 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/panels.less +261 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/popovers.less +135 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/print.less +107 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/progress-bars.less +87 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/responsive-embed.less +35 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/responsive-utilities.less +194 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/scaffolding.less +150 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/tables.less +234 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/theme.less +272 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/thumbnails.less +36 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/tooltip.less +103 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/type.less +302 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/utilities.less +56 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/variables.less +856 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/wells.less +29 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/package.json +82 -0
- data/lib/hyhyhy/structure/_includes/bower.json +9 -0
- data/lib/hyhyhy/structure/_includes/d3/.bower.json +37 -0
- data/lib/hyhyhy/structure/_includes/d3/CONTRIBUTING.md +25 -0
- data/lib/hyhyhy/structure/_includes/d3/LICENSE +26 -0
- data/lib/hyhyhy/structure/_includes/d3/README.md +9 -0
- data/lib/hyhyhy/structure/_includes/d3/bower.json +26 -0
- data/lib/hyhyhy/structure/_includes/d3/d3.js +9470 -0
- data/lib/hyhyhy/structure/_includes/d3/d3.min.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/.bower.json +38 -0
- data/lib/hyhyhy/structure/_includes/jquery/MIT-LICENSE.txt +21 -0
- data/lib/hyhyhy/structure/_includes/jquery/bower.json +27 -0
- data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.js +9190 -0
- data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.min.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.min.map +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax.js +806 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/jsonp.js +89 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/load.js +75 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/parseJSON.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/parseXML.js +28 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/script.js +64 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/var/nonce.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/var/rquery.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/xhr.js +135 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes.js +11 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/attr.js +143 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/classes.js +158 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/prop.js +96 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/support.js +35 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/val.js +163 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/callbacks.js +205 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core.js +498 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/access.js +60 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/init.js +123 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/parseHTML.js +39 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/ready.js +97 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/var/rsingleTag.js +4 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css.js +451 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/addGetHookIf.js +24 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/curCSS.js +57 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/defaultDisplay.js +70 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/support.js +91 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/swap.js +28 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/cssExpand.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/getStyles.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/isHidden.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/rmargin.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/rnumnonpx.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data.js +179 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/Data.js +181 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/accepts.js +20 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/var/data_priv.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/var/data_user.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/deferred.js +149 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/deprecated.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/dimensions.js +50 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/effects.js +649 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/effects/Tween.js +114 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/effects/animatedSelector.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/event.js +868 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/event/alias.js +39 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/event/support.js +9 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/exports/amd.js +24 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/exports/global.js +32 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/intro.js +44 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/jquery.js +36 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation.js +582 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/_evalUrl.js +18 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/support.js +31 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/offset.js +204 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/outro.js +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/queue.js +142 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/queue/delay.js +22 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/selector-native.js +172 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/selector-sizzle.js +14 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/selector.js +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/serialize.js +111 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.js +2044 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/traversing.js +200 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/traversing/findFilter.js +100 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/arr.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/class2type.js +4 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/concat.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/hasOwn.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/indexOf.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/pnum.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/push.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/rnotwhite.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/slice.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/strundefined.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/support.js +4 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/toString.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/wrap.js +78 -0
- data/lib/hyhyhy/structure/_includes/katex/.arcconfig +4 -0
- data/lib/hyhyhy/structure/_includes/katex/.bower.json +14 -0
- data/lib/hyhyhy/structure/_includes/katex/.gitignore +5 -0
- data/lib/hyhyhy/structure/_includes/katex/.hyhyhy +10 -0
- data/lib/hyhyhy/structure/_includes/katex/.jshintrc +67 -0
- data/lib/hyhyhy/structure/_includes/katex/.travis.yml +4 -0
- data/lib/hyhyhy/structure/_includes/katex/CONTRIBUTING.md +112 -0
- data/lib/hyhyhy/structure/_includes/katex/LICENSE.txt +21 -0
- data/lib/hyhyhy/structure/_includes/katex/Makefile +61 -0
- data/lib/hyhyhy/structure/_includes/katex/README.md +50 -0
- data/lib/hyhyhy/structure/_includes/katex/cli.js +15 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/HuxleyTests/Dockerfile +13 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/HuxleyTests/README.md +29 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/Dockerfile +34 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/README.md +55 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/copy_fonts.sh +47 -0
- data/lib/hyhyhy/structure/_includes/katex/katex.js +54 -0
- data/lib/hyhyhy/structure/_includes/katex/lint_blacklist.txt +8 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/README.md +21 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/extract_tfms.py +94 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/extract_ttfs.py +75 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/mapping.pl +997 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/parse_tfm.py +201 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py +17 -0
- data/lib/hyhyhy/structure/_includes/katex/package.json +30 -0
- data/lib/hyhyhy/structure/_includes/katex/server.js +77 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Lexer.js +190 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Options.js +85 -0
- data/lib/hyhyhy/structure/_includes/katex/src/ParseError.js +40 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Parser.js +639 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Style.js +126 -0
- data/lib/hyhyhy/structure/_includes/katex/src/buildCommon.js +271 -0
- data/lib/hyhyhy/structure/_includes/katex/src/buildTree.js +1167 -0
- data/lib/hyhyhy/structure/_includes/katex/src/delimiter.js +541 -0
- data/lib/hyhyhy/structure/_includes/katex/src/domTree.js +241 -0
- data/lib/hyhyhy/structure/_includes/katex/src/fontMetrics.js +129 -0
- data/lib/hyhyhy/structure/_includes/katex/src/functions.js +539 -0
- data/lib/hyhyhy/structure/_includes/katex/src/parseTree.js +17 -0
- data/lib/hyhyhy/structure/_includes/katex/src/symbols.js +1006 -0
- data/lib/hyhyhy/structure/_includes/katex/src/utils.js +97 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts.less +73 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-BoldItalic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/index.html +17 -0
- data/lib/hyhyhy/structure/_includes/katex/static/katex.less +430 -0
- data/lib/hyhyhy/structure/_includes/katex/static/main.css +12 -0
- data/lib/hyhyhy/structure/_includes/katex/static/main.js +42 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfile.json +199 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Accents.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Accents.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Baseline.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Baseline.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BasicTest.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BasicTest.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BinomTest.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BinomTest.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Colors.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Colors.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DeepFontSizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DeepFontSizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DelimiterSizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DelimiterSizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DisplayStyle.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DisplayStyle.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Exponents.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Exponents.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/FractionTest.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/FractionTest.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Functions.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Functions.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/GreekLetters.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/GreekLetters.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/KaTeX.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/KaTeX.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Lap.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Lap.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRight.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRight.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightListStyling.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightListStyling.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightStyleSizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightStyleSizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NestedFractions.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NestedFractions.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NullDelimiterInteraction.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NullDelimiterInteraction.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/OpLimits.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/OpLimits.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Overline.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Overline.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/PrimeSpacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/PrimeSpacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/RlapBug.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/RlapBug.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Rule.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Rule.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SizingBaseline.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SizingBaseline.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Spacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Spacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sqrt.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sqrt.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubCharacterBox.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubCharacterBox.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubHorizSpacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubHorizSpacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubOffsets.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubOffsets.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Text.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Text.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/VerticalSpacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/VerticalSpacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/test.html +30 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/MIT.LICENSE +20 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/boot.js +120 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/console.js +166 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine-html.js +390 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine.css +61 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine.js +2593 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine_favicon.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/katex-spec.js +1179 -0
- data/lib/hyhyhy/structure/_includes/katex/test/test.html +12 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/.bower.json +61 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/.hyhyhy +17 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/LICENSE +362 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/README.md +70 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/bower.json +50 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics-demo-dark.css +640 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics-demo.css +176 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics.css +344 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/images/missing-data-dark.png +0 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/images/missing-data.png +0 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/js/metricsgraphics.min.js +590 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/package.json +35 -0
- data/lib/hyhyhy/structure/_includes/prism/.bower.json +34 -0
- data/lib/hyhyhy/structure/_includes/prism/.hyhyhy +33 -0
- data/lib/hyhyhy/structure/_includes/prism/LICENSE +21 -0
- data/lib/hyhyhy/structure/_includes/prism/README.md +22 -0
- data/lib/hyhyhy/structure/_includes/prism/bower.json +26 -0
- data/lib/hyhyhy/structure/_includes/prism/components.js +233 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-apacheconf.js +46 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-apacheconf.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-aspnet.js +49 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-aspnet.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-autohotkey.js +27 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-autohotkey.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-bash.js +24 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-bash.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-c.js +26 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-c.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-clike.js +32 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-clike.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-coffeescript.js +18 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-coffeescript.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-core.js +424 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-core.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-cpp.js +12 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-cpp.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-csharp.js +6 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-csharp.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css-extras.js +15 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css-extras.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css.js +50 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-gherkin.js +13 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-gherkin.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-git.js +68 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-git.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-go.js +9 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-go.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-groovy.js +43 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-groovy.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-handlebars.js +92 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-handlebars.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-haskell.js +32 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-haskell.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-http.js +44 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-http.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ini.js +11 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ini.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-java.js +8 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-java.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js +27 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-javascript.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-latex.js +6 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-latex.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-markup.js +41 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-markup.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nasm.js +20 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nasm.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nsis.js +19 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nsis.min.js +5 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-objectivec.js +5 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-objectivec.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-perl.js +112 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-perl.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php-extras.js +11 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php-extras.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php.js +99 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-python.js +14 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-python.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-rip.js +29 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-rip.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ruby.js +21 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ruby.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scala.js +8 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scala.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scheme-min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scheme.js +24 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scss.js +36 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scss.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-sql.js +17 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-sql.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-swift.js +8 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-swift.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-twig.js +46 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-twig.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/gulpfile.js +48 -0
- data/lib/hyhyhy/structure/_includes/prism/package.json +27 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.css +3 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.js +66 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/file-highlight/prism-file-highlight.js +54 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/file-highlight/prism-file-highlight.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.css +3 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.js +42 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.css +47 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.js +109 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.css +40 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.js +24 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.css +17 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.js +15 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.css +21 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.js +16 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.min.css +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.css +11 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.js +163 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/prism.js +662 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-coy.css +210 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-dark.css +122 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-funky.css +111 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-okaidia.css +114 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-tomorrow.css +115 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-twilight.css +195 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism.css +131 -0
- data/lib/hyhyhy/structure/_includes/prism/vendor/promise.js +5 -0
- data/lib/hyhyhy/structure/_layouts/default.erb +41 -0
- data/lib/hyhyhy/structure/_slides/1.introduction.md +36 -0
- data/lib/hyhyhy/structure/_slides/2.packages.md +52 -0
- data/lib/hyhyhy/structure/_slides/3.usage.md +146 -0
- data/lib/hyhyhy/version.rb +5 -0
- metadata +747 -0
@@ -0,0 +1,2593 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2008-2014 Pivotal Labs
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
*/
|
23
|
+
function getJasmineRequireObj() {
|
24
|
+
if (typeof module !== 'undefined' && module.exports) {
|
25
|
+
return exports;
|
26
|
+
} else {
|
27
|
+
window.jasmineRequire = window.jasmineRequire || {};
|
28
|
+
return window.jasmineRequire;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
getJasmineRequireObj().core = function(jRequire) {
|
33
|
+
var j$ = {};
|
34
|
+
|
35
|
+
jRequire.base(j$);
|
36
|
+
j$.util = jRequire.util();
|
37
|
+
j$.Any = jRequire.Any();
|
38
|
+
j$.CallTracker = jRequire.CallTracker();
|
39
|
+
j$.MockDate = jRequire.MockDate();
|
40
|
+
j$.Clock = jRequire.Clock();
|
41
|
+
j$.DelayedFunctionScheduler = jRequire.DelayedFunctionScheduler();
|
42
|
+
j$.Env = jRequire.Env(j$);
|
43
|
+
j$.ExceptionFormatter = jRequire.ExceptionFormatter();
|
44
|
+
j$.Expectation = jRequire.Expectation();
|
45
|
+
j$.buildExpectationResult = jRequire.buildExpectationResult();
|
46
|
+
j$.JsApiReporter = jRequire.JsApiReporter();
|
47
|
+
j$.matchersUtil = jRequire.matchersUtil(j$);
|
48
|
+
j$.ObjectContaining = jRequire.ObjectContaining(j$);
|
49
|
+
j$.pp = jRequire.pp(j$);
|
50
|
+
j$.QueueRunner = jRequire.QueueRunner(j$);
|
51
|
+
j$.ReportDispatcher = jRequire.ReportDispatcher();
|
52
|
+
j$.Spec = jRequire.Spec(j$);
|
53
|
+
j$.SpyStrategy = jRequire.SpyStrategy();
|
54
|
+
j$.Suite = jRequire.Suite();
|
55
|
+
j$.Timer = jRequire.Timer();
|
56
|
+
j$.version = jRequire.version();
|
57
|
+
|
58
|
+
j$.matchers = jRequire.requireMatchers(jRequire, j$);
|
59
|
+
|
60
|
+
return j$;
|
61
|
+
};
|
62
|
+
|
63
|
+
getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
64
|
+
var availableMatchers = [
|
65
|
+
'toBe',
|
66
|
+
'toBeCloseTo',
|
67
|
+
'toBeDefined',
|
68
|
+
'toBeFalsy',
|
69
|
+
'toBeGreaterThan',
|
70
|
+
'toBeLessThan',
|
71
|
+
'toBeNaN',
|
72
|
+
'toBeNull',
|
73
|
+
'toBeTruthy',
|
74
|
+
'toBeUndefined',
|
75
|
+
'toContain',
|
76
|
+
'toEqual',
|
77
|
+
'toHaveBeenCalled',
|
78
|
+
'toHaveBeenCalledWith',
|
79
|
+
'toMatch',
|
80
|
+
'toThrow',
|
81
|
+
'toThrowError'
|
82
|
+
],
|
83
|
+
matchers = {};
|
84
|
+
|
85
|
+
for (var i = 0; i < availableMatchers.length; i++) {
|
86
|
+
var name = availableMatchers[i];
|
87
|
+
matchers[name] = jRequire[name](j$);
|
88
|
+
}
|
89
|
+
|
90
|
+
return matchers;
|
91
|
+
};
|
92
|
+
|
93
|
+
getJasmineRequireObj().base = (function (jasmineGlobal) {
|
94
|
+
if (typeof module !== 'undefined' && module.exports) {
|
95
|
+
jasmineGlobal = global;
|
96
|
+
}
|
97
|
+
|
98
|
+
return function(j$) {
|
99
|
+
j$.unimplementedMethod_ = function() {
|
100
|
+
throw new Error('unimplemented method');
|
101
|
+
};
|
102
|
+
|
103
|
+
j$.MAX_PRETTY_PRINT_DEPTH = 40;
|
104
|
+
j$.MAX_PRETTY_PRINT_ARRAY_LENGTH = 100;
|
105
|
+
j$.DEFAULT_TIMEOUT_INTERVAL = 5000;
|
106
|
+
|
107
|
+
j$.getGlobal = function() {
|
108
|
+
return jasmineGlobal;
|
109
|
+
};
|
110
|
+
|
111
|
+
j$.getEnv = function(options) {
|
112
|
+
var env = j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options);
|
113
|
+
//jasmine. singletons in here (setTimeout blah blah).
|
114
|
+
return env;
|
115
|
+
};
|
116
|
+
|
117
|
+
j$.isArray_ = function(value) {
|
118
|
+
return j$.isA_('Array', value);
|
119
|
+
};
|
120
|
+
|
121
|
+
j$.isString_ = function(value) {
|
122
|
+
return j$.isA_('String', value);
|
123
|
+
};
|
124
|
+
|
125
|
+
j$.isNumber_ = function(value) {
|
126
|
+
return j$.isA_('Number', value);
|
127
|
+
};
|
128
|
+
|
129
|
+
j$.isA_ = function(typeName, value) {
|
130
|
+
return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
|
131
|
+
};
|
132
|
+
|
133
|
+
j$.isDomNode = function(obj) {
|
134
|
+
return obj.nodeType > 0;
|
135
|
+
};
|
136
|
+
|
137
|
+
j$.any = function(clazz) {
|
138
|
+
return new j$.Any(clazz);
|
139
|
+
};
|
140
|
+
|
141
|
+
j$.objectContaining = function(sample) {
|
142
|
+
return new j$.ObjectContaining(sample);
|
143
|
+
};
|
144
|
+
|
145
|
+
j$.createSpy = function(name, originalFn) {
|
146
|
+
|
147
|
+
var spyStrategy = new j$.SpyStrategy({
|
148
|
+
name: name,
|
149
|
+
fn: originalFn,
|
150
|
+
getSpy: function() { return spy; }
|
151
|
+
}),
|
152
|
+
callTracker = new j$.CallTracker(),
|
153
|
+
spy = function() {
|
154
|
+
callTracker.track({
|
155
|
+
object: this,
|
156
|
+
args: Array.prototype.slice.apply(arguments)
|
157
|
+
});
|
158
|
+
return spyStrategy.exec.apply(this, arguments);
|
159
|
+
};
|
160
|
+
|
161
|
+
for (var prop in originalFn) {
|
162
|
+
if (prop === 'and' || prop === 'calls') {
|
163
|
+
throw new Error('Jasmine spies would overwrite the \'and\' and \'calls\' properties on the object being spied upon');
|
164
|
+
}
|
165
|
+
|
166
|
+
spy[prop] = originalFn[prop];
|
167
|
+
}
|
168
|
+
|
169
|
+
spy.and = spyStrategy;
|
170
|
+
spy.calls = callTracker;
|
171
|
+
|
172
|
+
return spy;
|
173
|
+
};
|
174
|
+
|
175
|
+
j$.isSpy = function(putativeSpy) {
|
176
|
+
if (!putativeSpy) {
|
177
|
+
return false;
|
178
|
+
}
|
179
|
+
return putativeSpy.and instanceof j$.SpyStrategy &&
|
180
|
+
putativeSpy.calls instanceof j$.CallTracker;
|
181
|
+
};
|
182
|
+
|
183
|
+
j$.createSpyObj = function(baseName, methodNames) {
|
184
|
+
if (!j$.isArray_(methodNames) || methodNames.length === 0) {
|
185
|
+
throw 'createSpyObj requires a non-empty array of method names to create spies for';
|
186
|
+
}
|
187
|
+
var obj = {};
|
188
|
+
for (var i = 0; i < methodNames.length; i++) {
|
189
|
+
obj[methodNames[i]] = j$.createSpy(baseName + '.' + methodNames[i]);
|
190
|
+
}
|
191
|
+
return obj;
|
192
|
+
};
|
193
|
+
};
|
194
|
+
})(this);
|
195
|
+
|
196
|
+
getJasmineRequireObj().util = function() {
|
197
|
+
|
198
|
+
var util = {};
|
199
|
+
|
200
|
+
util.inherit = function(childClass, parentClass) {
|
201
|
+
var Subclass = function() {
|
202
|
+
};
|
203
|
+
Subclass.prototype = parentClass.prototype;
|
204
|
+
childClass.prototype = new Subclass();
|
205
|
+
};
|
206
|
+
|
207
|
+
util.htmlEscape = function(str) {
|
208
|
+
if (!str) {
|
209
|
+
return str;
|
210
|
+
}
|
211
|
+
return str.replace(/&/g, '&')
|
212
|
+
.replace(/</g, '<')
|
213
|
+
.replace(/>/g, '>');
|
214
|
+
};
|
215
|
+
|
216
|
+
util.argsToArray = function(args) {
|
217
|
+
var arrayOfArgs = [];
|
218
|
+
for (var i = 0; i < args.length; i++) {
|
219
|
+
arrayOfArgs.push(args[i]);
|
220
|
+
}
|
221
|
+
return arrayOfArgs;
|
222
|
+
};
|
223
|
+
|
224
|
+
util.isUndefined = function(obj) {
|
225
|
+
return obj === void 0;
|
226
|
+
};
|
227
|
+
|
228
|
+
util.arrayContains = function(array, search) {
|
229
|
+
var i = array.length;
|
230
|
+
while (i--) {
|
231
|
+
if (array[i] == search) {
|
232
|
+
return true;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
return false;
|
236
|
+
};
|
237
|
+
|
238
|
+
return util;
|
239
|
+
};
|
240
|
+
|
241
|
+
getJasmineRequireObj().Spec = function(j$) {
|
242
|
+
function Spec(attrs) {
|
243
|
+
this.expectationFactory = attrs.expectationFactory;
|
244
|
+
this.resultCallback = attrs.resultCallback || function() {};
|
245
|
+
this.id = attrs.id;
|
246
|
+
this.description = attrs.description || '';
|
247
|
+
this.fn = attrs.fn;
|
248
|
+
this.beforeFns = attrs.beforeFns || function() { return []; };
|
249
|
+
this.afterFns = attrs.afterFns || function() { return []; };
|
250
|
+
this.onStart = attrs.onStart || function() {};
|
251
|
+
this.exceptionFormatter = attrs.exceptionFormatter || function() {};
|
252
|
+
this.getSpecName = attrs.getSpecName || function() { return ''; };
|
253
|
+
this.expectationResultFactory = attrs.expectationResultFactory || function() { };
|
254
|
+
this.queueRunnerFactory = attrs.queueRunnerFactory || function() {};
|
255
|
+
this.catchingExceptions = attrs.catchingExceptions || function() { return true; };
|
256
|
+
|
257
|
+
if (!this.fn) {
|
258
|
+
this.pend();
|
259
|
+
}
|
260
|
+
|
261
|
+
this.result = {
|
262
|
+
id: this.id,
|
263
|
+
description: this.description,
|
264
|
+
fullName: this.getFullName(),
|
265
|
+
failedExpectations: [],
|
266
|
+
passedExpectations: []
|
267
|
+
};
|
268
|
+
}
|
269
|
+
|
270
|
+
Spec.prototype.addExpectationResult = function(passed, data) {
|
271
|
+
var expectationResult = this.expectationResultFactory(data);
|
272
|
+
if (passed) {
|
273
|
+
this.result.passedExpectations.push(expectationResult);
|
274
|
+
} else {
|
275
|
+
this.result.failedExpectations.push(expectationResult);
|
276
|
+
}
|
277
|
+
};
|
278
|
+
|
279
|
+
Spec.prototype.expect = function(actual) {
|
280
|
+
return this.expectationFactory(actual, this);
|
281
|
+
};
|
282
|
+
|
283
|
+
Spec.prototype.execute = function(onComplete) {
|
284
|
+
var self = this;
|
285
|
+
|
286
|
+
this.onStart(this);
|
287
|
+
|
288
|
+
if (this.markedPending || this.disabled) {
|
289
|
+
complete();
|
290
|
+
return;
|
291
|
+
}
|
292
|
+
|
293
|
+
var allFns = this.beforeFns().concat(this.fn).concat(this.afterFns());
|
294
|
+
|
295
|
+
this.queueRunnerFactory({
|
296
|
+
fns: allFns,
|
297
|
+
onException: onException,
|
298
|
+
onComplete: complete,
|
299
|
+
enforceTimeout: function() { return true; }
|
300
|
+
});
|
301
|
+
|
302
|
+
function onException(e) {
|
303
|
+
if (Spec.isPendingSpecException(e)) {
|
304
|
+
self.pend();
|
305
|
+
return;
|
306
|
+
}
|
307
|
+
|
308
|
+
self.addExpectationResult(false, {
|
309
|
+
matcherName: '',
|
310
|
+
passed: false,
|
311
|
+
expected: '',
|
312
|
+
actual: '',
|
313
|
+
error: e
|
314
|
+
});
|
315
|
+
}
|
316
|
+
|
317
|
+
function complete() {
|
318
|
+
self.result.status = self.status();
|
319
|
+
self.resultCallback(self.result);
|
320
|
+
|
321
|
+
if (onComplete) {
|
322
|
+
onComplete();
|
323
|
+
}
|
324
|
+
}
|
325
|
+
};
|
326
|
+
|
327
|
+
Spec.prototype.disable = function() {
|
328
|
+
this.disabled = true;
|
329
|
+
};
|
330
|
+
|
331
|
+
Spec.prototype.pend = function() {
|
332
|
+
this.markedPending = true;
|
333
|
+
};
|
334
|
+
|
335
|
+
Spec.prototype.status = function() {
|
336
|
+
if (this.disabled) {
|
337
|
+
return 'disabled';
|
338
|
+
}
|
339
|
+
|
340
|
+
if (this.markedPending) {
|
341
|
+
return 'pending';
|
342
|
+
}
|
343
|
+
|
344
|
+
if (this.result.failedExpectations.length > 0) {
|
345
|
+
return 'failed';
|
346
|
+
} else {
|
347
|
+
return 'passed';
|
348
|
+
}
|
349
|
+
};
|
350
|
+
|
351
|
+
Spec.prototype.getFullName = function() {
|
352
|
+
return this.getSpecName(this);
|
353
|
+
};
|
354
|
+
|
355
|
+
Spec.pendingSpecExceptionMessage = '=> marked Pending';
|
356
|
+
|
357
|
+
Spec.isPendingSpecException = function(e) {
|
358
|
+
return !!(e && e.toString && e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1);
|
359
|
+
};
|
360
|
+
|
361
|
+
return Spec;
|
362
|
+
};
|
363
|
+
|
364
|
+
if (typeof window == void 0 && typeof exports == 'object') {
|
365
|
+
exports.Spec = jasmineRequire.Spec;
|
366
|
+
}
|
367
|
+
|
368
|
+
getJasmineRequireObj().Env = function(j$) {
|
369
|
+
function Env(options) {
|
370
|
+
options = options || {};
|
371
|
+
|
372
|
+
var self = this;
|
373
|
+
var global = options.global || j$.getGlobal();
|
374
|
+
|
375
|
+
var totalSpecsDefined = 0;
|
376
|
+
|
377
|
+
var catchExceptions = true;
|
378
|
+
|
379
|
+
var realSetTimeout = j$.getGlobal().setTimeout;
|
380
|
+
var realClearTimeout = j$.getGlobal().clearTimeout;
|
381
|
+
this.clock = new j$.Clock(global, new j$.DelayedFunctionScheduler(), new j$.MockDate(global));
|
382
|
+
|
383
|
+
var runnableLookupTable = {};
|
384
|
+
|
385
|
+
var spies = [];
|
386
|
+
|
387
|
+
var currentSpec = null;
|
388
|
+
var currentSuite = null;
|
389
|
+
|
390
|
+
var reporter = new j$.ReportDispatcher([
|
391
|
+
'jasmineStarted',
|
392
|
+
'jasmineDone',
|
393
|
+
'suiteStarted',
|
394
|
+
'suiteDone',
|
395
|
+
'specStarted',
|
396
|
+
'specDone'
|
397
|
+
]);
|
398
|
+
|
399
|
+
this.specFilter = function() {
|
400
|
+
return true;
|
401
|
+
};
|
402
|
+
|
403
|
+
var equalityTesters = [];
|
404
|
+
|
405
|
+
var customEqualityTesters = [];
|
406
|
+
this.addCustomEqualityTester = function(tester) {
|
407
|
+
customEqualityTesters.push(tester);
|
408
|
+
};
|
409
|
+
|
410
|
+
j$.Expectation.addCoreMatchers(j$.matchers);
|
411
|
+
|
412
|
+
var nextSpecId = 0;
|
413
|
+
var getNextSpecId = function() {
|
414
|
+
return 'spec' + nextSpecId++;
|
415
|
+
};
|
416
|
+
|
417
|
+
var nextSuiteId = 0;
|
418
|
+
var getNextSuiteId = function() {
|
419
|
+
return 'suite' + nextSuiteId++;
|
420
|
+
};
|
421
|
+
|
422
|
+
var expectationFactory = function(actual, spec) {
|
423
|
+
return j$.Expectation.Factory({
|
424
|
+
util: j$.matchersUtil,
|
425
|
+
customEqualityTesters: customEqualityTesters,
|
426
|
+
actual: actual,
|
427
|
+
addExpectationResult: addExpectationResult
|
428
|
+
});
|
429
|
+
|
430
|
+
function addExpectationResult(passed, result) {
|
431
|
+
return spec.addExpectationResult(passed, result);
|
432
|
+
}
|
433
|
+
};
|
434
|
+
|
435
|
+
var specStarted = function(spec) {
|
436
|
+
currentSpec = spec;
|
437
|
+
reporter.specStarted(spec.result);
|
438
|
+
};
|
439
|
+
|
440
|
+
var beforeFns = function(suite) {
|
441
|
+
return function() {
|
442
|
+
var befores = [];
|
443
|
+
while(suite) {
|
444
|
+
befores = befores.concat(suite.beforeFns);
|
445
|
+
suite = suite.parentSuite;
|
446
|
+
}
|
447
|
+
return befores.reverse();
|
448
|
+
};
|
449
|
+
};
|
450
|
+
|
451
|
+
var afterFns = function(suite) {
|
452
|
+
return function() {
|
453
|
+
var afters = [];
|
454
|
+
while(suite) {
|
455
|
+
afters = afters.concat(suite.afterFns);
|
456
|
+
suite = suite.parentSuite;
|
457
|
+
}
|
458
|
+
return afters;
|
459
|
+
};
|
460
|
+
};
|
461
|
+
|
462
|
+
var getSpecName = function(spec, suite) {
|
463
|
+
return suite.getFullName() + ' ' + spec.description;
|
464
|
+
};
|
465
|
+
|
466
|
+
// TODO: we may just be able to pass in the fn instead of wrapping here
|
467
|
+
var buildExpectationResult = j$.buildExpectationResult,
|
468
|
+
exceptionFormatter = new j$.ExceptionFormatter(),
|
469
|
+
expectationResultFactory = function(attrs) {
|
470
|
+
attrs.messageFormatter = exceptionFormatter.message;
|
471
|
+
attrs.stackFormatter = exceptionFormatter.stack;
|
472
|
+
|
473
|
+
return buildExpectationResult(attrs);
|
474
|
+
};
|
475
|
+
|
476
|
+
// TODO: fix this naming, and here's where the value comes in
|
477
|
+
this.catchExceptions = function(value) {
|
478
|
+
catchExceptions = !!value;
|
479
|
+
return catchExceptions;
|
480
|
+
};
|
481
|
+
|
482
|
+
this.catchingExceptions = function() {
|
483
|
+
return catchExceptions;
|
484
|
+
};
|
485
|
+
|
486
|
+
var maximumSpecCallbackDepth = 20;
|
487
|
+
var currentSpecCallbackDepth = 0;
|
488
|
+
|
489
|
+
function clearStack(fn) {
|
490
|
+
currentSpecCallbackDepth++;
|
491
|
+
if (currentSpecCallbackDepth >= maximumSpecCallbackDepth) {
|
492
|
+
currentSpecCallbackDepth = 0;
|
493
|
+
realSetTimeout(fn, 0);
|
494
|
+
} else {
|
495
|
+
fn();
|
496
|
+
}
|
497
|
+
}
|
498
|
+
|
499
|
+
var catchException = function(e) {
|
500
|
+
return j$.Spec.isPendingSpecException(e) || catchExceptions;
|
501
|
+
};
|
502
|
+
|
503
|
+
var queueRunnerFactory = function(options) {
|
504
|
+
options.catchException = catchException;
|
505
|
+
options.clearStack = options.clearStack || clearStack;
|
506
|
+
options.timer = {setTimeout: realSetTimeout, clearTimeout: realClearTimeout};
|
507
|
+
|
508
|
+
new j$.QueueRunner(options).execute();
|
509
|
+
};
|
510
|
+
|
511
|
+
var topSuite = new j$.Suite({
|
512
|
+
env: this,
|
513
|
+
id: getNextSuiteId(),
|
514
|
+
description: 'Jasmine__TopLevel__Suite',
|
515
|
+
queueRunner: queueRunnerFactory,
|
516
|
+
resultCallback: function() {} // TODO - hook this up
|
517
|
+
});
|
518
|
+
runnableLookupTable[topSuite.id] = topSuite;
|
519
|
+
currentSuite = topSuite;
|
520
|
+
|
521
|
+
this.topSuite = function() {
|
522
|
+
return topSuite;
|
523
|
+
};
|
524
|
+
|
525
|
+
this.execute = function(runnablesToRun) {
|
526
|
+
runnablesToRun = runnablesToRun || [topSuite.id];
|
527
|
+
|
528
|
+
var allFns = [];
|
529
|
+
for(var i = 0; i < runnablesToRun.length; i++) {
|
530
|
+
var runnable = runnableLookupTable[runnablesToRun[i]];
|
531
|
+
allFns.push((function(runnable) { return function(done) { runnable.execute(done); }; })(runnable));
|
532
|
+
}
|
533
|
+
|
534
|
+
reporter.jasmineStarted({
|
535
|
+
totalSpecsDefined: totalSpecsDefined
|
536
|
+
});
|
537
|
+
|
538
|
+
queueRunnerFactory({fns: allFns, onComplete: reporter.jasmineDone});
|
539
|
+
};
|
540
|
+
|
541
|
+
this.addReporter = function(reporterToAdd) {
|
542
|
+
reporter.addReporter(reporterToAdd);
|
543
|
+
};
|
544
|
+
|
545
|
+
this.addMatchers = function(matchersToAdd) {
|
546
|
+
j$.Expectation.addMatchers(matchersToAdd);
|
547
|
+
};
|
548
|
+
|
549
|
+
this.spyOn = function(obj, methodName) {
|
550
|
+
if (j$.util.isUndefined(obj)) {
|
551
|
+
throw new Error('spyOn could not find an object to spy upon for ' + methodName + '()');
|
552
|
+
}
|
553
|
+
|
554
|
+
if (j$.util.isUndefined(obj[methodName])) {
|
555
|
+
throw new Error(methodName + '() method does not exist');
|
556
|
+
}
|
557
|
+
|
558
|
+
if (obj[methodName] && j$.isSpy(obj[methodName])) {
|
559
|
+
//TODO?: should this return the current spy? Downside: may cause user confusion about spy state
|
560
|
+
throw new Error(methodName + ' has already been spied upon');
|
561
|
+
}
|
562
|
+
|
563
|
+
var spy = j$.createSpy(methodName, obj[methodName]);
|
564
|
+
|
565
|
+
spies.push({
|
566
|
+
spy: spy,
|
567
|
+
baseObj: obj,
|
568
|
+
methodName: methodName,
|
569
|
+
originalValue: obj[methodName]
|
570
|
+
});
|
571
|
+
|
572
|
+
obj[methodName] = spy;
|
573
|
+
|
574
|
+
return spy;
|
575
|
+
};
|
576
|
+
|
577
|
+
var suiteFactory = function(description) {
|
578
|
+
var suite = new j$.Suite({
|
579
|
+
env: self,
|
580
|
+
id: getNextSuiteId(),
|
581
|
+
description: description,
|
582
|
+
parentSuite: currentSuite,
|
583
|
+
queueRunner: queueRunnerFactory,
|
584
|
+
onStart: suiteStarted,
|
585
|
+
resultCallback: function(attrs) {
|
586
|
+
reporter.suiteDone(attrs);
|
587
|
+
}
|
588
|
+
});
|
589
|
+
|
590
|
+
runnableLookupTable[suite.id] = suite;
|
591
|
+
return suite;
|
592
|
+
};
|
593
|
+
|
594
|
+
this.describe = function(description, specDefinitions) {
|
595
|
+
var suite = suiteFactory(description);
|
596
|
+
|
597
|
+
var parentSuite = currentSuite;
|
598
|
+
parentSuite.addChild(suite);
|
599
|
+
currentSuite = suite;
|
600
|
+
|
601
|
+
var declarationError = null;
|
602
|
+
try {
|
603
|
+
specDefinitions.call(suite);
|
604
|
+
} catch (e) {
|
605
|
+
declarationError = e;
|
606
|
+
}
|
607
|
+
|
608
|
+
if (declarationError) {
|
609
|
+
this.it('encountered a declaration exception', function() {
|
610
|
+
throw declarationError;
|
611
|
+
});
|
612
|
+
}
|
613
|
+
|
614
|
+
currentSuite = parentSuite;
|
615
|
+
|
616
|
+
return suite;
|
617
|
+
};
|
618
|
+
|
619
|
+
this.xdescribe = function(description, specDefinitions) {
|
620
|
+
var suite = this.describe(description, specDefinitions);
|
621
|
+
suite.disable();
|
622
|
+
return suite;
|
623
|
+
};
|
624
|
+
|
625
|
+
var specFactory = function(description, fn, suite) {
|
626
|
+
totalSpecsDefined++;
|
627
|
+
|
628
|
+
var spec = new j$.Spec({
|
629
|
+
id: getNextSpecId(),
|
630
|
+
beforeFns: beforeFns(suite),
|
631
|
+
afterFns: afterFns(suite),
|
632
|
+
expectationFactory: expectationFactory,
|
633
|
+
exceptionFormatter: exceptionFormatter,
|
634
|
+
resultCallback: specResultCallback,
|
635
|
+
getSpecName: function(spec) {
|
636
|
+
return getSpecName(spec, suite);
|
637
|
+
},
|
638
|
+
onStart: specStarted,
|
639
|
+
description: description,
|
640
|
+
expectationResultFactory: expectationResultFactory,
|
641
|
+
queueRunnerFactory: queueRunnerFactory,
|
642
|
+
fn: fn
|
643
|
+
});
|
644
|
+
|
645
|
+
runnableLookupTable[spec.id] = spec;
|
646
|
+
|
647
|
+
if (!self.specFilter(spec)) {
|
648
|
+
spec.disable();
|
649
|
+
}
|
650
|
+
|
651
|
+
return spec;
|
652
|
+
|
653
|
+
function removeAllSpies() {
|
654
|
+
for (var i = 0; i < spies.length; i++) {
|
655
|
+
var spyEntry = spies[i];
|
656
|
+
spyEntry.baseObj[spyEntry.methodName] = spyEntry.originalValue;
|
657
|
+
}
|
658
|
+
spies = [];
|
659
|
+
}
|
660
|
+
|
661
|
+
function specResultCallback(result) {
|
662
|
+
removeAllSpies();
|
663
|
+
j$.Expectation.resetMatchers();
|
664
|
+
customEqualityTesters = [];
|
665
|
+
currentSpec = null;
|
666
|
+
reporter.specDone(result);
|
667
|
+
}
|
668
|
+
};
|
669
|
+
|
670
|
+
var suiteStarted = function(suite) {
|
671
|
+
reporter.suiteStarted(suite.result);
|
672
|
+
};
|
673
|
+
|
674
|
+
this.it = function(description, fn) {
|
675
|
+
var spec = specFactory(description, fn, currentSuite);
|
676
|
+
currentSuite.addChild(spec);
|
677
|
+
return spec;
|
678
|
+
};
|
679
|
+
|
680
|
+
this.xit = function(description, fn) {
|
681
|
+
var spec = this.it(description, fn);
|
682
|
+
spec.pend();
|
683
|
+
return spec;
|
684
|
+
};
|
685
|
+
|
686
|
+
this.expect = function(actual) {
|
687
|
+
if (!currentSpec) {
|
688
|
+
throw new Error('\'expect\' was used when there was no current spec, this could be because an asynchronous test timed out');
|
689
|
+
}
|
690
|
+
|
691
|
+
return currentSpec.expect(actual);
|
692
|
+
};
|
693
|
+
|
694
|
+
this.beforeEach = function(beforeEachFunction) {
|
695
|
+
currentSuite.beforeEach(beforeEachFunction);
|
696
|
+
};
|
697
|
+
|
698
|
+
this.afterEach = function(afterEachFunction) {
|
699
|
+
currentSuite.afterEach(afterEachFunction);
|
700
|
+
};
|
701
|
+
|
702
|
+
this.pending = function() {
|
703
|
+
throw j$.Spec.pendingSpecExceptionMessage;
|
704
|
+
};
|
705
|
+
}
|
706
|
+
|
707
|
+
return Env;
|
708
|
+
};
|
709
|
+
|
710
|
+
getJasmineRequireObj().JsApiReporter = function() {
|
711
|
+
|
712
|
+
var noopTimer = {
|
713
|
+
start: function(){},
|
714
|
+
elapsed: function(){ return 0; }
|
715
|
+
};
|
716
|
+
|
717
|
+
function JsApiReporter(options) {
|
718
|
+
var timer = options.timer || noopTimer,
|
719
|
+
status = 'loaded';
|
720
|
+
|
721
|
+
this.started = false;
|
722
|
+
this.finished = false;
|
723
|
+
|
724
|
+
this.jasmineStarted = function() {
|
725
|
+
this.started = true;
|
726
|
+
status = 'started';
|
727
|
+
timer.start();
|
728
|
+
};
|
729
|
+
|
730
|
+
var executionTime;
|
731
|
+
|
732
|
+
this.jasmineDone = function() {
|
733
|
+
this.finished = true;
|
734
|
+
executionTime = timer.elapsed();
|
735
|
+
status = 'done';
|
736
|
+
};
|
737
|
+
|
738
|
+
this.status = function() {
|
739
|
+
return status;
|
740
|
+
};
|
741
|
+
|
742
|
+
var suites = {};
|
743
|
+
|
744
|
+
this.suiteStarted = function(result) {
|
745
|
+
storeSuite(result);
|
746
|
+
};
|
747
|
+
|
748
|
+
this.suiteDone = function(result) {
|
749
|
+
storeSuite(result);
|
750
|
+
};
|
751
|
+
|
752
|
+
function storeSuite(result) {
|
753
|
+
suites[result.id] = result;
|
754
|
+
}
|
755
|
+
|
756
|
+
this.suites = function() {
|
757
|
+
return suites;
|
758
|
+
};
|
759
|
+
|
760
|
+
var specs = [];
|
761
|
+
this.specStarted = function(result) { };
|
762
|
+
|
763
|
+
this.specDone = function(result) {
|
764
|
+
specs.push(result);
|
765
|
+
};
|
766
|
+
|
767
|
+
this.specResults = function(index, length) {
|
768
|
+
return specs.slice(index, index + length);
|
769
|
+
};
|
770
|
+
|
771
|
+
this.specs = function() {
|
772
|
+
return specs;
|
773
|
+
};
|
774
|
+
|
775
|
+
this.executionTime = function() {
|
776
|
+
return executionTime;
|
777
|
+
};
|
778
|
+
|
779
|
+
}
|
780
|
+
|
781
|
+
return JsApiReporter;
|
782
|
+
};
|
783
|
+
|
784
|
+
getJasmineRequireObj().Any = function() {
|
785
|
+
|
786
|
+
function Any(expectedObject) {
|
787
|
+
this.expectedObject = expectedObject;
|
788
|
+
}
|
789
|
+
|
790
|
+
Any.prototype.jasmineMatches = function(other) {
|
791
|
+
if (this.expectedObject == String) {
|
792
|
+
return typeof other == 'string' || other instanceof String;
|
793
|
+
}
|
794
|
+
|
795
|
+
if (this.expectedObject == Number) {
|
796
|
+
return typeof other == 'number' || other instanceof Number;
|
797
|
+
}
|
798
|
+
|
799
|
+
if (this.expectedObject == Function) {
|
800
|
+
return typeof other == 'function' || other instanceof Function;
|
801
|
+
}
|
802
|
+
|
803
|
+
if (this.expectedObject == Object) {
|
804
|
+
return typeof other == 'object';
|
805
|
+
}
|
806
|
+
|
807
|
+
if (this.expectedObject == Boolean) {
|
808
|
+
return typeof other == 'boolean';
|
809
|
+
}
|
810
|
+
|
811
|
+
return other instanceof this.expectedObject;
|
812
|
+
};
|
813
|
+
|
814
|
+
Any.prototype.jasmineToString = function() {
|
815
|
+
return '<jasmine.any(' + this.expectedObject + ')>';
|
816
|
+
};
|
817
|
+
|
818
|
+
return Any;
|
819
|
+
};
|
820
|
+
|
821
|
+
getJasmineRequireObj().CallTracker = function() {
|
822
|
+
|
823
|
+
function CallTracker() {
|
824
|
+
var calls = [];
|
825
|
+
|
826
|
+
this.track = function(context) {
|
827
|
+
calls.push(context);
|
828
|
+
};
|
829
|
+
|
830
|
+
this.any = function() {
|
831
|
+
return !!calls.length;
|
832
|
+
};
|
833
|
+
|
834
|
+
this.count = function() {
|
835
|
+
return calls.length;
|
836
|
+
};
|
837
|
+
|
838
|
+
this.argsFor = function(index) {
|
839
|
+
var call = calls[index];
|
840
|
+
return call ? call.args : [];
|
841
|
+
};
|
842
|
+
|
843
|
+
this.all = function() {
|
844
|
+
return calls;
|
845
|
+
};
|
846
|
+
|
847
|
+
this.allArgs = function() {
|
848
|
+
var callArgs = [];
|
849
|
+
for(var i = 0; i < calls.length; i++){
|
850
|
+
callArgs.push(calls[i].args);
|
851
|
+
}
|
852
|
+
|
853
|
+
return callArgs;
|
854
|
+
};
|
855
|
+
|
856
|
+
this.first = function() {
|
857
|
+
return calls[0];
|
858
|
+
};
|
859
|
+
|
860
|
+
this.mostRecent = function() {
|
861
|
+
return calls[calls.length - 1];
|
862
|
+
};
|
863
|
+
|
864
|
+
this.reset = function() {
|
865
|
+
calls = [];
|
866
|
+
};
|
867
|
+
}
|
868
|
+
|
869
|
+
return CallTracker;
|
870
|
+
};
|
871
|
+
|
872
|
+
getJasmineRequireObj().Clock = function() {
|
873
|
+
function Clock(global, delayedFunctionScheduler, mockDate) {
|
874
|
+
var self = this,
|
875
|
+
realTimingFunctions = {
|
876
|
+
setTimeout: global.setTimeout,
|
877
|
+
clearTimeout: global.clearTimeout,
|
878
|
+
setInterval: global.setInterval,
|
879
|
+
clearInterval: global.clearInterval
|
880
|
+
},
|
881
|
+
fakeTimingFunctions = {
|
882
|
+
setTimeout: setTimeout,
|
883
|
+
clearTimeout: clearTimeout,
|
884
|
+
setInterval: setInterval,
|
885
|
+
clearInterval: clearInterval
|
886
|
+
},
|
887
|
+
installed = false,
|
888
|
+
timer;
|
889
|
+
|
890
|
+
|
891
|
+
self.install = function() {
|
892
|
+
replace(global, fakeTimingFunctions);
|
893
|
+
timer = fakeTimingFunctions;
|
894
|
+
installed = true;
|
895
|
+
|
896
|
+
return self;
|
897
|
+
};
|
898
|
+
|
899
|
+
self.uninstall = function() {
|
900
|
+
delayedFunctionScheduler.reset();
|
901
|
+
mockDate.uninstall();
|
902
|
+
replace(global, realTimingFunctions);
|
903
|
+
|
904
|
+
timer = realTimingFunctions;
|
905
|
+
installed = false;
|
906
|
+
};
|
907
|
+
|
908
|
+
self.mockDate = function(initialDate) {
|
909
|
+
mockDate.install(initialDate);
|
910
|
+
};
|
911
|
+
|
912
|
+
self.setTimeout = function(fn, delay, params) {
|
913
|
+
if (legacyIE()) {
|
914
|
+
if (arguments.length > 2) {
|
915
|
+
throw new Error('IE < 9 cannot support extra params to setTimeout without a polyfill');
|
916
|
+
}
|
917
|
+
return timer.setTimeout(fn, delay);
|
918
|
+
}
|
919
|
+
return Function.prototype.apply.apply(timer.setTimeout, [global, arguments]);
|
920
|
+
};
|
921
|
+
|
922
|
+
self.setInterval = function(fn, delay, params) {
|
923
|
+
if (legacyIE()) {
|
924
|
+
if (arguments.length > 2) {
|
925
|
+
throw new Error('IE < 9 cannot support extra params to setInterval without a polyfill');
|
926
|
+
}
|
927
|
+
return timer.setInterval(fn, delay);
|
928
|
+
}
|
929
|
+
return Function.prototype.apply.apply(timer.setInterval, [global, arguments]);
|
930
|
+
};
|
931
|
+
|
932
|
+
self.clearTimeout = function(id) {
|
933
|
+
return Function.prototype.call.apply(timer.clearTimeout, [global, id]);
|
934
|
+
};
|
935
|
+
|
936
|
+
self.clearInterval = function(id) {
|
937
|
+
return Function.prototype.call.apply(timer.clearInterval, [global, id]);
|
938
|
+
};
|
939
|
+
|
940
|
+
self.tick = function(millis) {
|
941
|
+
if (installed) {
|
942
|
+
mockDate.tick(millis);
|
943
|
+
delayedFunctionScheduler.tick(millis);
|
944
|
+
} else {
|
945
|
+
throw new Error('Mock clock is not installed, use jasmine.clock().install()');
|
946
|
+
}
|
947
|
+
};
|
948
|
+
|
949
|
+
return self;
|
950
|
+
|
951
|
+
function legacyIE() {
|
952
|
+
//if these methods are polyfilled, apply will be present
|
953
|
+
return !(realTimingFunctions.setTimeout || realTimingFunctions.setInterval).apply;
|
954
|
+
}
|
955
|
+
|
956
|
+
function replace(dest, source) {
|
957
|
+
for (var prop in source) {
|
958
|
+
dest[prop] = source[prop];
|
959
|
+
}
|
960
|
+
}
|
961
|
+
|
962
|
+
function setTimeout(fn, delay) {
|
963
|
+
return delayedFunctionScheduler.scheduleFunction(fn, delay, argSlice(arguments, 2));
|
964
|
+
}
|
965
|
+
|
966
|
+
function clearTimeout(id) {
|
967
|
+
return delayedFunctionScheduler.removeFunctionWithId(id);
|
968
|
+
}
|
969
|
+
|
970
|
+
function setInterval(fn, interval) {
|
971
|
+
return delayedFunctionScheduler.scheduleFunction(fn, interval, argSlice(arguments, 2), true);
|
972
|
+
}
|
973
|
+
|
974
|
+
function clearInterval(id) {
|
975
|
+
return delayedFunctionScheduler.removeFunctionWithId(id);
|
976
|
+
}
|
977
|
+
|
978
|
+
function argSlice(argsObj, n) {
|
979
|
+
return Array.prototype.slice.call(argsObj, n);
|
980
|
+
}
|
981
|
+
}
|
982
|
+
|
983
|
+
return Clock;
|
984
|
+
};
|
985
|
+
|
986
|
+
getJasmineRequireObj().DelayedFunctionScheduler = function() {
|
987
|
+
function DelayedFunctionScheduler() {
|
988
|
+
var self = this;
|
989
|
+
var scheduledLookup = [];
|
990
|
+
var scheduledFunctions = {};
|
991
|
+
var currentTime = 0;
|
992
|
+
var delayedFnCount = 0;
|
993
|
+
|
994
|
+
self.tick = function(millis) {
|
995
|
+
millis = millis || 0;
|
996
|
+
var endTime = currentTime + millis;
|
997
|
+
|
998
|
+
runScheduledFunctions(endTime);
|
999
|
+
currentTime = endTime;
|
1000
|
+
};
|
1001
|
+
|
1002
|
+
self.scheduleFunction = function(funcToCall, millis, params, recurring, timeoutKey, runAtMillis) {
|
1003
|
+
var f;
|
1004
|
+
if (typeof(funcToCall) === 'string') {
|
1005
|
+
/* jshint evil: true */
|
1006
|
+
f = function() { return eval(funcToCall); };
|
1007
|
+
/* jshint evil: false */
|
1008
|
+
} else {
|
1009
|
+
f = funcToCall;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
millis = millis || 0;
|
1013
|
+
timeoutKey = timeoutKey || ++delayedFnCount;
|
1014
|
+
runAtMillis = runAtMillis || (currentTime + millis);
|
1015
|
+
|
1016
|
+
var funcToSchedule = {
|
1017
|
+
runAtMillis: runAtMillis,
|
1018
|
+
funcToCall: f,
|
1019
|
+
recurring: recurring,
|
1020
|
+
params: params,
|
1021
|
+
timeoutKey: timeoutKey,
|
1022
|
+
millis: millis
|
1023
|
+
};
|
1024
|
+
|
1025
|
+
if (runAtMillis in scheduledFunctions) {
|
1026
|
+
scheduledFunctions[runAtMillis].push(funcToSchedule);
|
1027
|
+
} else {
|
1028
|
+
scheduledFunctions[runAtMillis] = [funcToSchedule];
|
1029
|
+
scheduledLookup.push(runAtMillis);
|
1030
|
+
scheduledLookup.sort(function (a, b) {
|
1031
|
+
return a - b;
|
1032
|
+
});
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
return timeoutKey;
|
1036
|
+
};
|
1037
|
+
|
1038
|
+
self.removeFunctionWithId = function(timeoutKey) {
|
1039
|
+
for (var runAtMillis in scheduledFunctions) {
|
1040
|
+
var funcs = scheduledFunctions[runAtMillis];
|
1041
|
+
var i = indexOfFirstToPass(funcs, function (func) {
|
1042
|
+
return func.timeoutKey === timeoutKey;
|
1043
|
+
});
|
1044
|
+
|
1045
|
+
if (i > -1) {
|
1046
|
+
if (funcs.length === 1) {
|
1047
|
+
delete scheduledFunctions[runAtMillis];
|
1048
|
+
deleteFromLookup(runAtMillis);
|
1049
|
+
} else {
|
1050
|
+
funcs.splice(i, 1);
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
// intervals get rescheduled when executed, so there's never more
|
1054
|
+
// than a single scheduled function with a given timeoutKey
|
1055
|
+
break;
|
1056
|
+
}
|
1057
|
+
}
|
1058
|
+
};
|
1059
|
+
|
1060
|
+
self.reset = function() {
|
1061
|
+
currentTime = 0;
|
1062
|
+
scheduledLookup = [];
|
1063
|
+
scheduledFunctions = {};
|
1064
|
+
delayedFnCount = 0;
|
1065
|
+
};
|
1066
|
+
|
1067
|
+
return self;
|
1068
|
+
|
1069
|
+
function indexOfFirstToPass(array, testFn) {
|
1070
|
+
var index = -1;
|
1071
|
+
|
1072
|
+
for (var i = 0; i < array.length; ++i) {
|
1073
|
+
if (testFn(array[i])) {
|
1074
|
+
index = i;
|
1075
|
+
break;
|
1076
|
+
}
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
return index;
|
1080
|
+
}
|
1081
|
+
|
1082
|
+
function deleteFromLookup(key) {
|
1083
|
+
var value = Number(key);
|
1084
|
+
var i = indexOfFirstToPass(scheduledLookup, function (millis) {
|
1085
|
+
return millis === value;
|
1086
|
+
});
|
1087
|
+
|
1088
|
+
if (i > -1) {
|
1089
|
+
scheduledLookup.splice(i, 1);
|
1090
|
+
}
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
function reschedule(scheduledFn) {
|
1094
|
+
self.scheduleFunction(scheduledFn.funcToCall,
|
1095
|
+
scheduledFn.millis,
|
1096
|
+
scheduledFn.params,
|
1097
|
+
true,
|
1098
|
+
scheduledFn.timeoutKey,
|
1099
|
+
scheduledFn.runAtMillis + scheduledFn.millis);
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
function runScheduledFunctions(endTime) {
|
1103
|
+
if (scheduledLookup.length === 0 || scheduledLookup[0] > endTime) {
|
1104
|
+
return;
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
do {
|
1108
|
+
currentTime = scheduledLookup.shift();
|
1109
|
+
|
1110
|
+
var funcsToRun = scheduledFunctions[currentTime];
|
1111
|
+
delete scheduledFunctions[currentTime];
|
1112
|
+
|
1113
|
+
for (var i = 0; i < funcsToRun.length; ++i) {
|
1114
|
+
var funcToRun = funcsToRun[i];
|
1115
|
+
funcToRun.funcToCall.apply(null, funcToRun.params || []);
|
1116
|
+
|
1117
|
+
if (funcToRun.recurring) {
|
1118
|
+
reschedule(funcToRun);
|
1119
|
+
}
|
1120
|
+
}
|
1121
|
+
} while (scheduledLookup.length > 0 &&
|
1122
|
+
// checking first if we're out of time prevents setTimeout(0)
|
1123
|
+
// scheduled in a funcToRun from forcing an extra iteration
|
1124
|
+
currentTime !== endTime &&
|
1125
|
+
scheduledLookup[0] <= endTime);
|
1126
|
+
}
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
return DelayedFunctionScheduler;
|
1130
|
+
};
|
1131
|
+
|
1132
|
+
getJasmineRequireObj().ExceptionFormatter = function() {
|
1133
|
+
function ExceptionFormatter() {
|
1134
|
+
this.message = function(error) {
|
1135
|
+
var message = '';
|
1136
|
+
|
1137
|
+
if (error.name && error.message) {
|
1138
|
+
message += error.name + ': ' + error.message;
|
1139
|
+
} else {
|
1140
|
+
message += error.toString() + ' thrown';
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
if (error.fileName || error.sourceURL) {
|
1144
|
+
message += ' in ' + (error.fileName || error.sourceURL);
|
1145
|
+
}
|
1146
|
+
|
1147
|
+
if (error.line || error.lineNumber) {
|
1148
|
+
message += ' (line ' + (error.line || error.lineNumber) + ')';
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
return message;
|
1152
|
+
};
|
1153
|
+
|
1154
|
+
this.stack = function(error) {
|
1155
|
+
return error ? error.stack : null;
|
1156
|
+
};
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
return ExceptionFormatter;
|
1160
|
+
};
|
1161
|
+
|
1162
|
+
getJasmineRequireObj().Expectation = function() {
|
1163
|
+
|
1164
|
+
var matchers = {};
|
1165
|
+
|
1166
|
+
function Expectation(options) {
|
1167
|
+
this.util = options.util || { buildFailureMessage: function() {} };
|
1168
|
+
this.customEqualityTesters = options.customEqualityTesters || [];
|
1169
|
+
this.actual = options.actual;
|
1170
|
+
this.addExpectationResult = options.addExpectationResult || function(){};
|
1171
|
+
this.isNot = options.isNot;
|
1172
|
+
|
1173
|
+
for (var matcherName in matchers) {
|
1174
|
+
this[matcherName] = matchers[matcherName];
|
1175
|
+
}
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
Expectation.prototype.wrapCompare = function(name, matcherFactory) {
|
1179
|
+
return function() {
|
1180
|
+
var args = Array.prototype.slice.call(arguments, 0),
|
1181
|
+
expected = args.slice(0),
|
1182
|
+
message = '';
|
1183
|
+
|
1184
|
+
args.unshift(this.actual);
|
1185
|
+
|
1186
|
+
var matcher = matcherFactory(this.util, this.customEqualityTesters),
|
1187
|
+
matcherCompare = matcher.compare;
|
1188
|
+
|
1189
|
+
function defaultNegativeCompare() {
|
1190
|
+
var result = matcher.compare.apply(null, args);
|
1191
|
+
result.pass = !result.pass;
|
1192
|
+
return result;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
if (this.isNot) {
|
1196
|
+
matcherCompare = matcher.negativeCompare || defaultNegativeCompare;
|
1197
|
+
}
|
1198
|
+
|
1199
|
+
var result = matcherCompare.apply(null, args);
|
1200
|
+
|
1201
|
+
if (!result.pass) {
|
1202
|
+
if (!result.message) {
|
1203
|
+
args.unshift(this.isNot);
|
1204
|
+
args.unshift(name);
|
1205
|
+
message = this.util.buildFailureMessage.apply(null, args);
|
1206
|
+
} else {
|
1207
|
+
if (Object.prototype.toString.apply(result.message) === '[object Function]') {
|
1208
|
+
message = result.message();
|
1209
|
+
} else {
|
1210
|
+
message = result.message;
|
1211
|
+
}
|
1212
|
+
}
|
1213
|
+
}
|
1214
|
+
|
1215
|
+
if (expected.length == 1) {
|
1216
|
+
expected = expected[0];
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
// TODO: how many of these params are needed?
|
1220
|
+
this.addExpectationResult(
|
1221
|
+
result.pass,
|
1222
|
+
{
|
1223
|
+
matcherName: name,
|
1224
|
+
passed: result.pass,
|
1225
|
+
message: message,
|
1226
|
+
actual: this.actual,
|
1227
|
+
expected: expected // TODO: this may need to be arrayified/sliced
|
1228
|
+
}
|
1229
|
+
);
|
1230
|
+
};
|
1231
|
+
};
|
1232
|
+
|
1233
|
+
Expectation.addCoreMatchers = function(matchers) {
|
1234
|
+
var prototype = Expectation.prototype;
|
1235
|
+
for (var matcherName in matchers) {
|
1236
|
+
var matcher = matchers[matcherName];
|
1237
|
+
prototype[matcherName] = prototype.wrapCompare(matcherName, matcher);
|
1238
|
+
}
|
1239
|
+
};
|
1240
|
+
|
1241
|
+
Expectation.addMatchers = function(matchersToAdd) {
|
1242
|
+
for (var name in matchersToAdd) {
|
1243
|
+
var matcher = matchersToAdd[name];
|
1244
|
+
matchers[name] = Expectation.prototype.wrapCompare(name, matcher);
|
1245
|
+
}
|
1246
|
+
};
|
1247
|
+
|
1248
|
+
Expectation.resetMatchers = function() {
|
1249
|
+
for (var name in matchers) {
|
1250
|
+
delete matchers[name];
|
1251
|
+
}
|
1252
|
+
};
|
1253
|
+
|
1254
|
+
Expectation.Factory = function(options) {
|
1255
|
+
options = options || {};
|
1256
|
+
|
1257
|
+
var expect = new Expectation(options);
|
1258
|
+
|
1259
|
+
// TODO: this would be nice as its own Object - NegativeExpectation
|
1260
|
+
// TODO: copy instead of mutate options
|
1261
|
+
options.isNot = true;
|
1262
|
+
expect.not = new Expectation(options);
|
1263
|
+
|
1264
|
+
return expect;
|
1265
|
+
};
|
1266
|
+
|
1267
|
+
return Expectation;
|
1268
|
+
};
|
1269
|
+
|
1270
|
+
//TODO: expectation result may make more sense as a presentation of an expectation.
|
1271
|
+
getJasmineRequireObj().buildExpectationResult = function() {
|
1272
|
+
function buildExpectationResult(options) {
|
1273
|
+
var messageFormatter = options.messageFormatter || function() {},
|
1274
|
+
stackFormatter = options.stackFormatter || function() {};
|
1275
|
+
|
1276
|
+
return {
|
1277
|
+
matcherName: options.matcherName,
|
1278
|
+
expected: options.expected,
|
1279
|
+
actual: options.actual,
|
1280
|
+
message: message(),
|
1281
|
+
stack: stack(),
|
1282
|
+
passed: options.passed
|
1283
|
+
};
|
1284
|
+
|
1285
|
+
function message() {
|
1286
|
+
if (options.passed) {
|
1287
|
+
return 'Passed.';
|
1288
|
+
} else if (options.message) {
|
1289
|
+
return options.message;
|
1290
|
+
} else if (options.error) {
|
1291
|
+
return messageFormatter(options.error);
|
1292
|
+
}
|
1293
|
+
return '';
|
1294
|
+
}
|
1295
|
+
|
1296
|
+
function stack() {
|
1297
|
+
if (options.passed) {
|
1298
|
+
return '';
|
1299
|
+
}
|
1300
|
+
|
1301
|
+
var error = options.error;
|
1302
|
+
if (!error) {
|
1303
|
+
try {
|
1304
|
+
throw new Error(message());
|
1305
|
+
} catch (e) {
|
1306
|
+
error = e;
|
1307
|
+
}
|
1308
|
+
}
|
1309
|
+
return stackFormatter(error);
|
1310
|
+
}
|
1311
|
+
}
|
1312
|
+
|
1313
|
+
return buildExpectationResult;
|
1314
|
+
};
|
1315
|
+
|
1316
|
+
getJasmineRequireObj().MockDate = function() {
|
1317
|
+
function MockDate(global) {
|
1318
|
+
var self = this;
|
1319
|
+
var currentTime = 0;
|
1320
|
+
|
1321
|
+
if (!global || !global.Date) {
|
1322
|
+
self.install = function() {};
|
1323
|
+
self.tick = function() {};
|
1324
|
+
self.uninstall = function() {};
|
1325
|
+
return self;
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
var GlobalDate = global.Date;
|
1329
|
+
|
1330
|
+
self.install = function(mockDate) {
|
1331
|
+
if (mockDate instanceof GlobalDate) {
|
1332
|
+
currentTime = mockDate.getTime();
|
1333
|
+
} else {
|
1334
|
+
currentTime = new GlobalDate().getTime();
|
1335
|
+
}
|
1336
|
+
|
1337
|
+
global.Date = FakeDate;
|
1338
|
+
};
|
1339
|
+
|
1340
|
+
self.tick = function(millis) {
|
1341
|
+
millis = millis || 0;
|
1342
|
+
currentTime = currentTime + millis;
|
1343
|
+
};
|
1344
|
+
|
1345
|
+
self.uninstall = function() {
|
1346
|
+
currentTime = 0;
|
1347
|
+
global.Date = GlobalDate;
|
1348
|
+
};
|
1349
|
+
|
1350
|
+
createDateProperties();
|
1351
|
+
|
1352
|
+
return self;
|
1353
|
+
|
1354
|
+
function FakeDate() {
|
1355
|
+
switch(arguments.length) {
|
1356
|
+
case 0:
|
1357
|
+
return new GlobalDate(currentTime);
|
1358
|
+
case 1:
|
1359
|
+
return new GlobalDate(arguments[0]);
|
1360
|
+
case 2:
|
1361
|
+
return new GlobalDate(arguments[0], arguments[1]);
|
1362
|
+
case 3:
|
1363
|
+
return new GlobalDate(arguments[0], arguments[1], arguments[2]);
|
1364
|
+
case 4:
|
1365
|
+
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3]);
|
1366
|
+
case 5:
|
1367
|
+
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],
|
1368
|
+
arguments[4]);
|
1369
|
+
case 6:
|
1370
|
+
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],
|
1371
|
+
arguments[4], arguments[5]);
|
1372
|
+
case 7:
|
1373
|
+
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],
|
1374
|
+
arguments[4], arguments[5], arguments[6]);
|
1375
|
+
}
|
1376
|
+
}
|
1377
|
+
|
1378
|
+
function createDateProperties() {
|
1379
|
+
|
1380
|
+
FakeDate.now = function() {
|
1381
|
+
if (GlobalDate.now) {
|
1382
|
+
return currentTime;
|
1383
|
+
} else {
|
1384
|
+
throw new Error('Browser does not support Date.now()');
|
1385
|
+
}
|
1386
|
+
};
|
1387
|
+
|
1388
|
+
FakeDate.toSource = GlobalDate.toSource;
|
1389
|
+
FakeDate.toString = GlobalDate.toString;
|
1390
|
+
FakeDate.parse = GlobalDate.parse;
|
1391
|
+
FakeDate.UTC = GlobalDate.UTC;
|
1392
|
+
}
|
1393
|
+
}
|
1394
|
+
|
1395
|
+
return MockDate;
|
1396
|
+
};
|
1397
|
+
|
1398
|
+
getJasmineRequireObj().ObjectContaining = function(j$) {
|
1399
|
+
|
1400
|
+
function ObjectContaining(sample) {
|
1401
|
+
this.sample = sample;
|
1402
|
+
}
|
1403
|
+
|
1404
|
+
ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {
|
1405
|
+
if (typeof(this.sample) !== 'object') { throw new Error('You must provide an object to objectContaining, not \''+this.sample+'\'.'); }
|
1406
|
+
|
1407
|
+
mismatchKeys = mismatchKeys || [];
|
1408
|
+
mismatchValues = mismatchValues || [];
|
1409
|
+
|
1410
|
+
var hasKey = function(obj, keyName) {
|
1411
|
+
return obj !== null && !j$.util.isUndefined(obj[keyName]);
|
1412
|
+
};
|
1413
|
+
|
1414
|
+
for (var property in this.sample) {
|
1415
|
+
if (!hasKey(other, property) && hasKey(this.sample, property)) {
|
1416
|
+
mismatchKeys.push('expected has key \'' + property + '\', but missing from actual.');
|
1417
|
+
}
|
1418
|
+
else if (!j$.matchersUtil.equals(other[property], this.sample[property])) {
|
1419
|
+
mismatchValues.push('\'' + property + '\' was \'' + (other[property] ? j$.util.htmlEscape(other[property].toString()) : other[property]) + '\' in actual, but was \'' + (this.sample[property] ? j$.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + '\' in expected.');
|
1420
|
+
}
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
return (mismatchKeys.length === 0 && mismatchValues.length === 0);
|
1424
|
+
};
|
1425
|
+
|
1426
|
+
ObjectContaining.prototype.jasmineToString = function() {
|
1427
|
+
return '<jasmine.objectContaining(' + j$.pp(this.sample) + ')>';
|
1428
|
+
};
|
1429
|
+
|
1430
|
+
return ObjectContaining;
|
1431
|
+
};
|
1432
|
+
|
1433
|
+
getJasmineRequireObj().pp = function(j$) {
|
1434
|
+
|
1435
|
+
function PrettyPrinter() {
|
1436
|
+
this.ppNestLevel_ = 0;
|
1437
|
+
this.seen = [];
|
1438
|
+
}
|
1439
|
+
|
1440
|
+
PrettyPrinter.prototype.format = function(value) {
|
1441
|
+
this.ppNestLevel_++;
|
1442
|
+
try {
|
1443
|
+
if (j$.util.isUndefined(value)) {
|
1444
|
+
this.emitScalar('undefined');
|
1445
|
+
} else if (value === null) {
|
1446
|
+
this.emitScalar('null');
|
1447
|
+
} else if (value === 0 && 1/value === -Infinity) {
|
1448
|
+
this.emitScalar('-0');
|
1449
|
+
} else if (value === j$.getGlobal()) {
|
1450
|
+
this.emitScalar('<global>');
|
1451
|
+
} else if (value.jasmineToString) {
|
1452
|
+
this.emitScalar(value.jasmineToString());
|
1453
|
+
} else if (typeof value === 'string') {
|
1454
|
+
this.emitString(value);
|
1455
|
+
} else if (j$.isSpy(value)) {
|
1456
|
+
this.emitScalar('spy on ' + value.and.identity());
|
1457
|
+
} else if (value instanceof RegExp) {
|
1458
|
+
this.emitScalar(value.toString());
|
1459
|
+
} else if (typeof value === 'function') {
|
1460
|
+
this.emitScalar('Function');
|
1461
|
+
} else if (typeof value.nodeType === 'number') {
|
1462
|
+
this.emitScalar('HTMLNode');
|
1463
|
+
} else if (value instanceof Date) {
|
1464
|
+
this.emitScalar('Date(' + value + ')');
|
1465
|
+
} else if (j$.util.arrayContains(this.seen, value)) {
|
1466
|
+
this.emitScalar('<circular reference: ' + (j$.isArray_(value) ? 'Array' : 'Object') + '>');
|
1467
|
+
} else if (j$.isArray_(value) || j$.isA_('Object', value)) {
|
1468
|
+
this.seen.push(value);
|
1469
|
+
if (j$.isArray_(value)) {
|
1470
|
+
this.emitArray(value);
|
1471
|
+
} else {
|
1472
|
+
this.emitObject(value);
|
1473
|
+
}
|
1474
|
+
this.seen.pop();
|
1475
|
+
} else {
|
1476
|
+
this.emitScalar(value.toString());
|
1477
|
+
}
|
1478
|
+
} finally {
|
1479
|
+
this.ppNestLevel_--;
|
1480
|
+
}
|
1481
|
+
};
|
1482
|
+
|
1483
|
+
PrettyPrinter.prototype.iterateObject = function(obj, fn) {
|
1484
|
+
for (var property in obj) {
|
1485
|
+
if (!Object.prototype.hasOwnProperty.call(obj, property)) { continue; }
|
1486
|
+
fn(property, obj.__lookupGetter__ ? (!j$.util.isUndefined(obj.__lookupGetter__(property)) &&
|
1487
|
+
obj.__lookupGetter__(property) !== null) : false);
|
1488
|
+
}
|
1489
|
+
};
|
1490
|
+
|
1491
|
+
PrettyPrinter.prototype.emitArray = j$.unimplementedMethod_;
|
1492
|
+
PrettyPrinter.prototype.emitObject = j$.unimplementedMethod_;
|
1493
|
+
PrettyPrinter.prototype.emitScalar = j$.unimplementedMethod_;
|
1494
|
+
PrettyPrinter.prototype.emitString = j$.unimplementedMethod_;
|
1495
|
+
|
1496
|
+
function StringPrettyPrinter() {
|
1497
|
+
PrettyPrinter.call(this);
|
1498
|
+
|
1499
|
+
this.string = '';
|
1500
|
+
}
|
1501
|
+
|
1502
|
+
j$.util.inherit(StringPrettyPrinter, PrettyPrinter);
|
1503
|
+
|
1504
|
+
StringPrettyPrinter.prototype.emitScalar = function(value) {
|
1505
|
+
this.append(value);
|
1506
|
+
};
|
1507
|
+
|
1508
|
+
StringPrettyPrinter.prototype.emitString = function(value) {
|
1509
|
+
this.append('\'' + value + '\'');
|
1510
|
+
};
|
1511
|
+
|
1512
|
+
StringPrettyPrinter.prototype.emitArray = function(array) {
|
1513
|
+
if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {
|
1514
|
+
this.append('Array');
|
1515
|
+
return;
|
1516
|
+
}
|
1517
|
+
var length = Math.min(array.length, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH);
|
1518
|
+
this.append('[ ');
|
1519
|
+
for (var i = 0; i < length; i++) {
|
1520
|
+
if (i > 0) {
|
1521
|
+
this.append(', ');
|
1522
|
+
}
|
1523
|
+
this.format(array[i]);
|
1524
|
+
}
|
1525
|
+
if(array.length > length){
|
1526
|
+
this.append(', ...');
|
1527
|
+
}
|
1528
|
+
this.append(' ]');
|
1529
|
+
};
|
1530
|
+
|
1531
|
+
StringPrettyPrinter.prototype.emitObject = function(obj) {
|
1532
|
+
if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {
|
1533
|
+
this.append('Object');
|
1534
|
+
return;
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
var self = this;
|
1538
|
+
this.append('{ ');
|
1539
|
+
var first = true;
|
1540
|
+
|
1541
|
+
this.iterateObject(obj, function(property, isGetter) {
|
1542
|
+
if (first) {
|
1543
|
+
first = false;
|
1544
|
+
} else {
|
1545
|
+
self.append(', ');
|
1546
|
+
}
|
1547
|
+
|
1548
|
+
self.append(property);
|
1549
|
+
self.append(': ');
|
1550
|
+
if (isGetter) {
|
1551
|
+
self.append('<getter>');
|
1552
|
+
} else {
|
1553
|
+
self.format(obj[property]);
|
1554
|
+
}
|
1555
|
+
});
|
1556
|
+
|
1557
|
+
this.append(' }');
|
1558
|
+
};
|
1559
|
+
|
1560
|
+
StringPrettyPrinter.prototype.append = function(value) {
|
1561
|
+
this.string += value;
|
1562
|
+
};
|
1563
|
+
|
1564
|
+
return function(value) {
|
1565
|
+
var stringPrettyPrinter = new StringPrettyPrinter();
|
1566
|
+
stringPrettyPrinter.format(value);
|
1567
|
+
return stringPrettyPrinter.string;
|
1568
|
+
};
|
1569
|
+
};
|
1570
|
+
|
1571
|
+
getJasmineRequireObj().QueueRunner = function(j$) {
|
1572
|
+
|
1573
|
+
function once(fn) {
|
1574
|
+
var called = false;
|
1575
|
+
return function() {
|
1576
|
+
if (!called) {
|
1577
|
+
called = true;
|
1578
|
+
fn();
|
1579
|
+
}
|
1580
|
+
};
|
1581
|
+
}
|
1582
|
+
|
1583
|
+
function QueueRunner(attrs) {
|
1584
|
+
this.fns = attrs.fns || [];
|
1585
|
+
this.onComplete = attrs.onComplete || function() {};
|
1586
|
+
this.clearStack = attrs.clearStack || function(fn) {fn();};
|
1587
|
+
this.onException = attrs.onException || function() {};
|
1588
|
+
this.catchException = attrs.catchException || function() { return true; };
|
1589
|
+
this.enforceTimeout = attrs.enforceTimeout || function() { return false; };
|
1590
|
+
this.userContext = {};
|
1591
|
+
this.timer = attrs.timeout || {setTimeout: setTimeout, clearTimeout: clearTimeout};
|
1592
|
+
}
|
1593
|
+
|
1594
|
+
QueueRunner.prototype.execute = function() {
|
1595
|
+
this.run(this.fns, 0);
|
1596
|
+
};
|
1597
|
+
|
1598
|
+
QueueRunner.prototype.run = function(fns, recursiveIndex) {
|
1599
|
+
var length = fns.length,
|
1600
|
+
self = this,
|
1601
|
+
iterativeIndex;
|
1602
|
+
|
1603
|
+
for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) {
|
1604
|
+
var fn = fns[iterativeIndex];
|
1605
|
+
if (fn.length > 0) {
|
1606
|
+
return attemptAsync(fn);
|
1607
|
+
} else {
|
1608
|
+
attemptSync(fn);
|
1609
|
+
}
|
1610
|
+
}
|
1611
|
+
|
1612
|
+
var runnerDone = iterativeIndex >= length;
|
1613
|
+
|
1614
|
+
if (runnerDone) {
|
1615
|
+
this.clearStack(this.onComplete);
|
1616
|
+
}
|
1617
|
+
|
1618
|
+
function attemptSync(fn) {
|
1619
|
+
try {
|
1620
|
+
fn.call(self.userContext);
|
1621
|
+
} catch (e) {
|
1622
|
+
handleException(e);
|
1623
|
+
}
|
1624
|
+
}
|
1625
|
+
|
1626
|
+
function attemptAsync(fn) {
|
1627
|
+
var clearTimeout = function () {
|
1628
|
+
Function.prototype.apply.apply(self.timer.clearTimeout, [j$.getGlobal(), [timeoutId]]);
|
1629
|
+
},
|
1630
|
+
next = once(function () {
|
1631
|
+
clearTimeout(timeoutId);
|
1632
|
+
self.run(fns, iterativeIndex + 1);
|
1633
|
+
}),
|
1634
|
+
timeoutId;
|
1635
|
+
|
1636
|
+
if (self.enforceTimeout()) {
|
1637
|
+
timeoutId = Function.prototype.apply.apply(self.timer.setTimeout, [j$.getGlobal(), [function() {
|
1638
|
+
self.onException(new Error('Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.'));
|
1639
|
+
next();
|
1640
|
+
}, j$.DEFAULT_TIMEOUT_INTERVAL]]);
|
1641
|
+
}
|
1642
|
+
|
1643
|
+
try {
|
1644
|
+
fn.call(self.userContext, next);
|
1645
|
+
} catch (e) {
|
1646
|
+
handleException(e);
|
1647
|
+
next();
|
1648
|
+
}
|
1649
|
+
}
|
1650
|
+
|
1651
|
+
function handleException(e) {
|
1652
|
+
self.onException(e);
|
1653
|
+
if (!self.catchException(e)) {
|
1654
|
+
//TODO: set a var when we catch an exception and
|
1655
|
+
//use a finally block to close the loop in a nice way..
|
1656
|
+
throw e;
|
1657
|
+
}
|
1658
|
+
}
|
1659
|
+
};
|
1660
|
+
|
1661
|
+
return QueueRunner;
|
1662
|
+
};
|
1663
|
+
|
1664
|
+
getJasmineRequireObj().ReportDispatcher = function() {
|
1665
|
+
function ReportDispatcher(methods) {
|
1666
|
+
|
1667
|
+
var dispatchedMethods = methods || [];
|
1668
|
+
|
1669
|
+
for (var i = 0; i < dispatchedMethods.length; i++) {
|
1670
|
+
var method = dispatchedMethods[i];
|
1671
|
+
this[method] = (function(m) {
|
1672
|
+
return function() {
|
1673
|
+
dispatch(m, arguments);
|
1674
|
+
};
|
1675
|
+
}(method));
|
1676
|
+
}
|
1677
|
+
|
1678
|
+
var reporters = [];
|
1679
|
+
|
1680
|
+
this.addReporter = function(reporter) {
|
1681
|
+
reporters.push(reporter);
|
1682
|
+
};
|
1683
|
+
|
1684
|
+
return this;
|
1685
|
+
|
1686
|
+
function dispatch(method, args) {
|
1687
|
+
for (var i = 0; i < reporters.length; i++) {
|
1688
|
+
var reporter = reporters[i];
|
1689
|
+
if (reporter[method]) {
|
1690
|
+
reporter[method].apply(reporter, args);
|
1691
|
+
}
|
1692
|
+
}
|
1693
|
+
}
|
1694
|
+
}
|
1695
|
+
|
1696
|
+
return ReportDispatcher;
|
1697
|
+
};
|
1698
|
+
|
1699
|
+
|
1700
|
+
getJasmineRequireObj().SpyStrategy = function() {
|
1701
|
+
|
1702
|
+
function SpyStrategy(options) {
|
1703
|
+
options = options || {};
|
1704
|
+
|
1705
|
+
var identity = options.name || 'unknown',
|
1706
|
+
originalFn = options.fn || function() {},
|
1707
|
+
getSpy = options.getSpy || function() {},
|
1708
|
+
plan = function() {};
|
1709
|
+
|
1710
|
+
this.identity = function() {
|
1711
|
+
return identity;
|
1712
|
+
};
|
1713
|
+
|
1714
|
+
this.exec = function() {
|
1715
|
+
return plan.apply(this, arguments);
|
1716
|
+
};
|
1717
|
+
|
1718
|
+
this.callThrough = function() {
|
1719
|
+
plan = originalFn;
|
1720
|
+
return getSpy();
|
1721
|
+
};
|
1722
|
+
|
1723
|
+
this.returnValue = function(value) {
|
1724
|
+
plan = function() {
|
1725
|
+
return value;
|
1726
|
+
};
|
1727
|
+
return getSpy();
|
1728
|
+
};
|
1729
|
+
|
1730
|
+
this.throwError = function(something) {
|
1731
|
+
var error = (something instanceof Error) ? something : new Error(something);
|
1732
|
+
plan = function() {
|
1733
|
+
throw error;
|
1734
|
+
};
|
1735
|
+
return getSpy();
|
1736
|
+
};
|
1737
|
+
|
1738
|
+
this.callFake = function(fn) {
|
1739
|
+
plan = fn;
|
1740
|
+
return getSpy();
|
1741
|
+
};
|
1742
|
+
|
1743
|
+
this.stub = function(fn) {
|
1744
|
+
plan = function() {};
|
1745
|
+
return getSpy();
|
1746
|
+
};
|
1747
|
+
}
|
1748
|
+
|
1749
|
+
return SpyStrategy;
|
1750
|
+
};
|
1751
|
+
|
1752
|
+
getJasmineRequireObj().Suite = function() {
|
1753
|
+
function Suite(attrs) {
|
1754
|
+
this.env = attrs.env;
|
1755
|
+
this.id = attrs.id;
|
1756
|
+
this.parentSuite = attrs.parentSuite;
|
1757
|
+
this.description = attrs.description;
|
1758
|
+
this.onStart = attrs.onStart || function() {};
|
1759
|
+
this.resultCallback = attrs.resultCallback || function() {};
|
1760
|
+
this.clearStack = attrs.clearStack || function(fn) {fn();};
|
1761
|
+
|
1762
|
+
this.beforeFns = [];
|
1763
|
+
this.afterFns = [];
|
1764
|
+
this.queueRunner = attrs.queueRunner || function() {};
|
1765
|
+
this.disabled = false;
|
1766
|
+
|
1767
|
+
this.children = [];
|
1768
|
+
|
1769
|
+
this.result = {
|
1770
|
+
id: this.id,
|
1771
|
+
status: this.disabled ? 'disabled' : '',
|
1772
|
+
description: this.description,
|
1773
|
+
fullName: this.getFullName()
|
1774
|
+
};
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
Suite.prototype.getFullName = function() {
|
1778
|
+
var fullName = this.description;
|
1779
|
+
for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
|
1780
|
+
if (parentSuite.parentSuite) {
|
1781
|
+
fullName = parentSuite.description + ' ' + fullName;
|
1782
|
+
}
|
1783
|
+
}
|
1784
|
+
return fullName;
|
1785
|
+
};
|
1786
|
+
|
1787
|
+
Suite.prototype.disable = function() {
|
1788
|
+
this.disabled = true;
|
1789
|
+
this.result.status = 'disabled';
|
1790
|
+
};
|
1791
|
+
|
1792
|
+
Suite.prototype.beforeEach = function(fn) {
|
1793
|
+
this.beforeFns.unshift(fn);
|
1794
|
+
};
|
1795
|
+
|
1796
|
+
Suite.prototype.afterEach = function(fn) {
|
1797
|
+
this.afterFns.unshift(fn);
|
1798
|
+
};
|
1799
|
+
|
1800
|
+
Suite.prototype.addChild = function(child) {
|
1801
|
+
this.children.push(child);
|
1802
|
+
};
|
1803
|
+
|
1804
|
+
Suite.prototype.execute = function(onComplete) {
|
1805
|
+
var self = this;
|
1806
|
+
|
1807
|
+
this.onStart(this);
|
1808
|
+
|
1809
|
+
if (this.disabled) {
|
1810
|
+
complete();
|
1811
|
+
return;
|
1812
|
+
}
|
1813
|
+
|
1814
|
+
var allFns = [];
|
1815
|
+
|
1816
|
+
for (var i = 0; i < this.children.length; i++) {
|
1817
|
+
allFns.push(wrapChildAsAsync(this.children[i]));
|
1818
|
+
}
|
1819
|
+
|
1820
|
+
this.queueRunner({
|
1821
|
+
fns: allFns,
|
1822
|
+
onComplete: complete
|
1823
|
+
});
|
1824
|
+
|
1825
|
+
function complete() {
|
1826
|
+
self.resultCallback(self.result);
|
1827
|
+
|
1828
|
+
if (onComplete) {
|
1829
|
+
onComplete();
|
1830
|
+
}
|
1831
|
+
}
|
1832
|
+
|
1833
|
+
function wrapChildAsAsync(child) {
|
1834
|
+
return function(done) { child.execute(done); };
|
1835
|
+
}
|
1836
|
+
};
|
1837
|
+
|
1838
|
+
return Suite;
|
1839
|
+
};
|
1840
|
+
|
1841
|
+
if (typeof window == void 0 && typeof exports == 'object') {
|
1842
|
+
exports.Suite = jasmineRequire.Suite;
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
getJasmineRequireObj().Timer = function() {
|
1846
|
+
var defaultNow = (function(Date) {
|
1847
|
+
return function() { return new Date().getTime(); };
|
1848
|
+
})(Date);
|
1849
|
+
|
1850
|
+
function Timer(options) {
|
1851
|
+
options = options || {};
|
1852
|
+
|
1853
|
+
var now = options.now || defaultNow,
|
1854
|
+
startTime;
|
1855
|
+
|
1856
|
+
this.start = function() {
|
1857
|
+
startTime = now();
|
1858
|
+
};
|
1859
|
+
|
1860
|
+
this.elapsed = function() {
|
1861
|
+
return now() - startTime;
|
1862
|
+
};
|
1863
|
+
}
|
1864
|
+
|
1865
|
+
return Timer;
|
1866
|
+
};
|
1867
|
+
|
1868
|
+
getJasmineRequireObj().matchersUtil = function(j$) {
|
1869
|
+
// TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?
|
1870
|
+
|
1871
|
+
return {
|
1872
|
+
equals: function(a, b, customTesters) {
|
1873
|
+
customTesters = customTesters || [];
|
1874
|
+
|
1875
|
+
return eq(a, b, [], [], customTesters);
|
1876
|
+
},
|
1877
|
+
|
1878
|
+
contains: function(haystack, needle, customTesters) {
|
1879
|
+
customTesters = customTesters || [];
|
1880
|
+
|
1881
|
+
if (Object.prototype.toString.apply(haystack) === '[object Array]') {
|
1882
|
+
for (var i = 0; i < haystack.length; i++) {
|
1883
|
+
if (eq(haystack[i], needle, [], [], customTesters)) {
|
1884
|
+
return true;
|
1885
|
+
}
|
1886
|
+
}
|
1887
|
+
return false;
|
1888
|
+
}
|
1889
|
+
return !!haystack && haystack.indexOf(needle) >= 0;
|
1890
|
+
},
|
1891
|
+
|
1892
|
+
buildFailureMessage: function() {
|
1893
|
+
var args = Array.prototype.slice.call(arguments, 0),
|
1894
|
+
matcherName = args[0],
|
1895
|
+
isNot = args[1],
|
1896
|
+
actual = args[2],
|
1897
|
+
expected = args.slice(3),
|
1898
|
+
englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
|
1899
|
+
|
1900
|
+
var message = 'Expected ' +
|
1901
|
+
j$.pp(actual) +
|
1902
|
+
(isNot ? ' not ' : ' ') +
|
1903
|
+
englishyPredicate;
|
1904
|
+
|
1905
|
+
if (expected.length > 0) {
|
1906
|
+
for (var i = 0; i < expected.length; i++) {
|
1907
|
+
if (i > 0) {
|
1908
|
+
message += ',';
|
1909
|
+
}
|
1910
|
+
message += ' ' + j$.pp(expected[i]);
|
1911
|
+
}
|
1912
|
+
}
|
1913
|
+
|
1914
|
+
return message + '.';
|
1915
|
+
}
|
1916
|
+
};
|
1917
|
+
|
1918
|
+
// Equality function lovingly adapted from isEqual in
|
1919
|
+
// [Underscore](http://underscorejs.org)
|
1920
|
+
function eq(a, b, aStack, bStack, customTesters) {
|
1921
|
+
var result = true;
|
1922
|
+
|
1923
|
+
for (var i = 0; i < customTesters.length; i++) {
|
1924
|
+
var customTesterResult = customTesters[i](a, b);
|
1925
|
+
if (!j$.util.isUndefined(customTesterResult)) {
|
1926
|
+
return customTesterResult;
|
1927
|
+
}
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
if (a instanceof j$.Any) {
|
1931
|
+
result = a.jasmineMatches(b);
|
1932
|
+
if (result) {
|
1933
|
+
return true;
|
1934
|
+
}
|
1935
|
+
}
|
1936
|
+
|
1937
|
+
if (b instanceof j$.Any) {
|
1938
|
+
result = b.jasmineMatches(a);
|
1939
|
+
if (result) {
|
1940
|
+
return true;
|
1941
|
+
}
|
1942
|
+
}
|
1943
|
+
|
1944
|
+
if (b instanceof j$.ObjectContaining) {
|
1945
|
+
result = b.jasmineMatches(a);
|
1946
|
+
if (result) {
|
1947
|
+
return true;
|
1948
|
+
}
|
1949
|
+
}
|
1950
|
+
|
1951
|
+
if (a instanceof Error && b instanceof Error) {
|
1952
|
+
return a.message == b.message;
|
1953
|
+
}
|
1954
|
+
|
1955
|
+
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
1956
|
+
// See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
|
1957
|
+
if (a === b) { return a !== 0 || 1 / a == 1 / b; }
|
1958
|
+
// A strict comparison is necessary because `null == undefined`.
|
1959
|
+
if (a === null || b === null) { return a === b; }
|
1960
|
+
var className = Object.prototype.toString.call(a);
|
1961
|
+
if (className != Object.prototype.toString.call(b)) { return false; }
|
1962
|
+
switch (className) {
|
1963
|
+
// Strings, numbers, dates, and booleans are compared by value.
|
1964
|
+
case '[object String]':
|
1965
|
+
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
|
1966
|
+
// equivalent to `new String("5")`.
|
1967
|
+
return a == String(b);
|
1968
|
+
case '[object Number]':
|
1969
|
+
// `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
|
1970
|
+
// other numeric values.
|
1971
|
+
return a != +a ? b != +b : (a === 0 ? 1 / a == 1 / b : a == +b);
|
1972
|
+
case '[object Date]':
|
1973
|
+
case '[object Boolean]':
|
1974
|
+
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
|
1975
|
+
// millisecond representations. Note that invalid dates with millisecond representations
|
1976
|
+
// of `NaN` are not equivalent.
|
1977
|
+
return +a == +b;
|
1978
|
+
// RegExps are compared by their source patterns and flags.
|
1979
|
+
case '[object RegExp]':
|
1980
|
+
return a.source == b.source &&
|
1981
|
+
a.global == b.global &&
|
1982
|
+
a.multiline == b.multiline &&
|
1983
|
+
a.ignoreCase == b.ignoreCase;
|
1984
|
+
}
|
1985
|
+
if (typeof a != 'object' || typeof b != 'object') { return false; }
|
1986
|
+
// Assume equality for cyclic structures. The algorithm for detecting cyclic
|
1987
|
+
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
1988
|
+
var length = aStack.length;
|
1989
|
+
while (length--) {
|
1990
|
+
// Linear search. Performance is inversely proportional to the number of
|
1991
|
+
// unique nested structures.
|
1992
|
+
if (aStack[length] == a) { return bStack[length] == b; }
|
1993
|
+
}
|
1994
|
+
// Add the first object to the stack of traversed objects.
|
1995
|
+
aStack.push(a);
|
1996
|
+
bStack.push(b);
|
1997
|
+
var size = 0;
|
1998
|
+
// Recursively compare objects and arrays.
|
1999
|
+
if (className == '[object Array]') {
|
2000
|
+
// Compare array lengths to determine if a deep comparison is necessary.
|
2001
|
+
size = a.length;
|
2002
|
+
result = size == b.length;
|
2003
|
+
if (result) {
|
2004
|
+
// Deep compare the contents, ignoring non-numeric properties.
|
2005
|
+
while (size--) {
|
2006
|
+
if (!(result = eq(a[size], b[size], aStack, bStack, customTesters))) { break; }
|
2007
|
+
}
|
2008
|
+
}
|
2009
|
+
} else {
|
2010
|
+
// Objects with different constructors are not equivalent, but `Object`s
|
2011
|
+
// from different frames are.
|
2012
|
+
var aCtor = a.constructor, bCtor = b.constructor;
|
2013
|
+
if (aCtor !== bCtor && !(isFunction(aCtor) && (aCtor instanceof aCtor) &&
|
2014
|
+
isFunction(bCtor) && (bCtor instanceof bCtor))) {
|
2015
|
+
return false;
|
2016
|
+
}
|
2017
|
+
// Deep compare objects.
|
2018
|
+
for (var key in a) {
|
2019
|
+
if (has(a, key)) {
|
2020
|
+
// Count the expected number of properties.
|
2021
|
+
size++;
|
2022
|
+
// Deep compare each member.
|
2023
|
+
if (!(result = has(b, key) && eq(a[key], b[key], aStack, bStack, customTesters))) { break; }
|
2024
|
+
}
|
2025
|
+
}
|
2026
|
+
// Ensure that both objects contain the same number of properties.
|
2027
|
+
if (result) {
|
2028
|
+
for (key in b) {
|
2029
|
+
if (has(b, key) && !(size--)) { break; }
|
2030
|
+
}
|
2031
|
+
result = !size;
|
2032
|
+
}
|
2033
|
+
}
|
2034
|
+
// Remove the first object from the stack of traversed objects.
|
2035
|
+
aStack.pop();
|
2036
|
+
bStack.pop();
|
2037
|
+
|
2038
|
+
return result;
|
2039
|
+
|
2040
|
+
function has(obj, key) {
|
2041
|
+
return obj.hasOwnProperty(key);
|
2042
|
+
}
|
2043
|
+
|
2044
|
+
function isFunction(obj) {
|
2045
|
+
return typeof obj === 'function';
|
2046
|
+
}
|
2047
|
+
}
|
2048
|
+
};
|
2049
|
+
|
2050
|
+
getJasmineRequireObj().toBe = function() {
|
2051
|
+
function toBe() {
|
2052
|
+
return {
|
2053
|
+
compare: function(actual, expected) {
|
2054
|
+
return {
|
2055
|
+
pass: actual === expected
|
2056
|
+
};
|
2057
|
+
}
|
2058
|
+
};
|
2059
|
+
}
|
2060
|
+
|
2061
|
+
return toBe;
|
2062
|
+
};
|
2063
|
+
|
2064
|
+
getJasmineRequireObj().toBeCloseTo = function() {
|
2065
|
+
|
2066
|
+
function toBeCloseTo() {
|
2067
|
+
return {
|
2068
|
+
compare: function(actual, expected, precision) {
|
2069
|
+
if (precision !== 0) {
|
2070
|
+
precision = precision || 2;
|
2071
|
+
}
|
2072
|
+
|
2073
|
+
return {
|
2074
|
+
pass: Math.abs(expected - actual) < (Math.pow(10, -precision) / 2)
|
2075
|
+
};
|
2076
|
+
}
|
2077
|
+
};
|
2078
|
+
}
|
2079
|
+
|
2080
|
+
return toBeCloseTo;
|
2081
|
+
};
|
2082
|
+
|
2083
|
+
getJasmineRequireObj().toBeDefined = function() {
|
2084
|
+
function toBeDefined() {
|
2085
|
+
return {
|
2086
|
+
compare: function(actual) {
|
2087
|
+
return {
|
2088
|
+
pass: (void 0 !== actual)
|
2089
|
+
};
|
2090
|
+
}
|
2091
|
+
};
|
2092
|
+
}
|
2093
|
+
|
2094
|
+
return toBeDefined;
|
2095
|
+
};
|
2096
|
+
|
2097
|
+
getJasmineRequireObj().toBeFalsy = function() {
|
2098
|
+
function toBeFalsy() {
|
2099
|
+
return {
|
2100
|
+
compare: function(actual) {
|
2101
|
+
return {
|
2102
|
+
pass: !!!actual
|
2103
|
+
};
|
2104
|
+
}
|
2105
|
+
};
|
2106
|
+
}
|
2107
|
+
|
2108
|
+
return toBeFalsy;
|
2109
|
+
};
|
2110
|
+
|
2111
|
+
getJasmineRequireObj().toBeGreaterThan = function() {
|
2112
|
+
|
2113
|
+
function toBeGreaterThan() {
|
2114
|
+
return {
|
2115
|
+
compare: function(actual, expected) {
|
2116
|
+
return {
|
2117
|
+
pass: actual > expected
|
2118
|
+
};
|
2119
|
+
}
|
2120
|
+
};
|
2121
|
+
}
|
2122
|
+
|
2123
|
+
return toBeGreaterThan;
|
2124
|
+
};
|
2125
|
+
|
2126
|
+
|
2127
|
+
getJasmineRequireObj().toBeLessThan = function() {
|
2128
|
+
function toBeLessThan() {
|
2129
|
+
return {
|
2130
|
+
|
2131
|
+
compare: function(actual, expected) {
|
2132
|
+
return {
|
2133
|
+
pass: actual < expected
|
2134
|
+
};
|
2135
|
+
}
|
2136
|
+
};
|
2137
|
+
}
|
2138
|
+
|
2139
|
+
return toBeLessThan;
|
2140
|
+
};
|
2141
|
+
getJasmineRequireObj().toBeNaN = function(j$) {
|
2142
|
+
|
2143
|
+
function toBeNaN() {
|
2144
|
+
return {
|
2145
|
+
compare: function(actual) {
|
2146
|
+
var result = {
|
2147
|
+
pass: (actual !== actual)
|
2148
|
+
};
|
2149
|
+
|
2150
|
+
if (result.pass) {
|
2151
|
+
result.message = 'Expected actual not to be NaN.';
|
2152
|
+
} else {
|
2153
|
+
result.message = function() { return 'Expected ' + j$.pp(actual) + ' to be NaN.'; };
|
2154
|
+
}
|
2155
|
+
|
2156
|
+
return result;
|
2157
|
+
}
|
2158
|
+
};
|
2159
|
+
}
|
2160
|
+
|
2161
|
+
return toBeNaN;
|
2162
|
+
};
|
2163
|
+
|
2164
|
+
getJasmineRequireObj().toBeNull = function() {
|
2165
|
+
|
2166
|
+
function toBeNull() {
|
2167
|
+
return {
|
2168
|
+
compare: function(actual) {
|
2169
|
+
return {
|
2170
|
+
pass: actual === null
|
2171
|
+
};
|
2172
|
+
}
|
2173
|
+
};
|
2174
|
+
}
|
2175
|
+
|
2176
|
+
return toBeNull;
|
2177
|
+
};
|
2178
|
+
|
2179
|
+
getJasmineRequireObj().toBeTruthy = function() {
|
2180
|
+
|
2181
|
+
function toBeTruthy() {
|
2182
|
+
return {
|
2183
|
+
compare: function(actual) {
|
2184
|
+
return {
|
2185
|
+
pass: !!actual
|
2186
|
+
};
|
2187
|
+
}
|
2188
|
+
};
|
2189
|
+
}
|
2190
|
+
|
2191
|
+
return toBeTruthy;
|
2192
|
+
};
|
2193
|
+
|
2194
|
+
getJasmineRequireObj().toBeUndefined = function() {
|
2195
|
+
|
2196
|
+
function toBeUndefined() {
|
2197
|
+
return {
|
2198
|
+
compare: function(actual) {
|
2199
|
+
return {
|
2200
|
+
pass: void 0 === actual
|
2201
|
+
};
|
2202
|
+
}
|
2203
|
+
};
|
2204
|
+
}
|
2205
|
+
|
2206
|
+
return toBeUndefined;
|
2207
|
+
};
|
2208
|
+
|
2209
|
+
getJasmineRequireObj().toContain = function() {
|
2210
|
+
function toContain(util, customEqualityTesters) {
|
2211
|
+
customEqualityTesters = customEqualityTesters || [];
|
2212
|
+
|
2213
|
+
return {
|
2214
|
+
compare: function(actual, expected) {
|
2215
|
+
|
2216
|
+
return {
|
2217
|
+
pass: util.contains(actual, expected, customEqualityTesters)
|
2218
|
+
};
|
2219
|
+
}
|
2220
|
+
};
|
2221
|
+
}
|
2222
|
+
|
2223
|
+
return toContain;
|
2224
|
+
};
|
2225
|
+
|
2226
|
+
getJasmineRequireObj().toEqual = function() {
|
2227
|
+
|
2228
|
+
function toEqual(util, customEqualityTesters) {
|
2229
|
+
customEqualityTesters = customEqualityTesters || [];
|
2230
|
+
|
2231
|
+
return {
|
2232
|
+
compare: function(actual, expected) {
|
2233
|
+
var result = {
|
2234
|
+
pass: false
|
2235
|
+
};
|
2236
|
+
|
2237
|
+
result.pass = util.equals(actual, expected, customEqualityTesters);
|
2238
|
+
|
2239
|
+
return result;
|
2240
|
+
}
|
2241
|
+
};
|
2242
|
+
}
|
2243
|
+
|
2244
|
+
return toEqual;
|
2245
|
+
};
|
2246
|
+
|
2247
|
+
getJasmineRequireObj().toHaveBeenCalled = function(j$) {
|
2248
|
+
|
2249
|
+
function toHaveBeenCalled() {
|
2250
|
+
return {
|
2251
|
+
compare: function(actual) {
|
2252
|
+
var result = {};
|
2253
|
+
|
2254
|
+
if (!j$.isSpy(actual)) {
|
2255
|
+
throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.');
|
2256
|
+
}
|
2257
|
+
|
2258
|
+
if (arguments.length > 1) {
|
2259
|
+
throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
|
2260
|
+
}
|
2261
|
+
|
2262
|
+
result.pass = actual.calls.any();
|
2263
|
+
|
2264
|
+
result.message = result.pass ?
|
2265
|
+
'Expected spy ' + actual.and.identity() + ' not to have been called.' :
|
2266
|
+
'Expected spy ' + actual.and.identity() + ' to have been called.';
|
2267
|
+
|
2268
|
+
return result;
|
2269
|
+
}
|
2270
|
+
};
|
2271
|
+
}
|
2272
|
+
|
2273
|
+
return toHaveBeenCalled;
|
2274
|
+
};
|
2275
|
+
|
2276
|
+
getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
|
2277
|
+
|
2278
|
+
function toHaveBeenCalledWith(util, customEqualityTesters) {
|
2279
|
+
return {
|
2280
|
+
compare: function() {
|
2281
|
+
var args = Array.prototype.slice.call(arguments, 0),
|
2282
|
+
actual = args[0],
|
2283
|
+
expectedArgs = args.slice(1),
|
2284
|
+
result = { pass: false };
|
2285
|
+
|
2286
|
+
if (!j$.isSpy(actual)) {
|
2287
|
+
throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.');
|
2288
|
+
}
|
2289
|
+
|
2290
|
+
if (!actual.calls.any()) {
|
2291
|
+
result.message = function() { return 'Expected spy ' + actual.and.identity() + ' to have been called with ' + j$.pp(expectedArgs) + ' but it was never called.'; };
|
2292
|
+
return result;
|
2293
|
+
}
|
2294
|
+
|
2295
|
+
if (util.contains(actual.calls.allArgs(), expectedArgs, customEqualityTesters)) {
|
2296
|
+
result.pass = true;
|
2297
|
+
result.message = function() { return 'Expected spy ' + actual.and.identity() + ' not to have been called with ' + j$.pp(expectedArgs) + ' but it was.'; };
|
2298
|
+
} else {
|
2299
|
+
result.message = function() { return 'Expected spy ' + actual.and.identity() + ' to have been called with ' + j$.pp(expectedArgs) + ' but actual calls were ' + j$.pp(actual.calls.allArgs()).replace(/^\[ | \]$/g, '') + '.'; };
|
2300
|
+
}
|
2301
|
+
|
2302
|
+
return result;
|
2303
|
+
}
|
2304
|
+
};
|
2305
|
+
}
|
2306
|
+
|
2307
|
+
return toHaveBeenCalledWith;
|
2308
|
+
};
|
2309
|
+
|
2310
|
+
getJasmineRequireObj().toMatch = function() {
|
2311
|
+
|
2312
|
+
function toMatch() {
|
2313
|
+
return {
|
2314
|
+
compare: function(actual, expected) {
|
2315
|
+
var regexp = new RegExp(expected);
|
2316
|
+
|
2317
|
+
return {
|
2318
|
+
pass: regexp.test(actual)
|
2319
|
+
};
|
2320
|
+
}
|
2321
|
+
};
|
2322
|
+
}
|
2323
|
+
|
2324
|
+
return toMatch;
|
2325
|
+
};
|
2326
|
+
|
2327
|
+
getJasmineRequireObj().toThrow = function(j$) {
|
2328
|
+
|
2329
|
+
function toThrow(util) {
|
2330
|
+
return {
|
2331
|
+
compare: function(actual, expected) {
|
2332
|
+
var result = { pass: false },
|
2333
|
+
threw = false,
|
2334
|
+
thrown;
|
2335
|
+
|
2336
|
+
if (typeof actual != 'function') {
|
2337
|
+
throw new Error('Actual is not a Function');
|
2338
|
+
}
|
2339
|
+
|
2340
|
+
try {
|
2341
|
+
actual();
|
2342
|
+
} catch (e) {
|
2343
|
+
threw = true;
|
2344
|
+
thrown = e;
|
2345
|
+
}
|
2346
|
+
|
2347
|
+
if (!threw) {
|
2348
|
+
result.message = 'Expected function to throw an exception.';
|
2349
|
+
return result;
|
2350
|
+
}
|
2351
|
+
|
2352
|
+
if (arguments.length == 1) {
|
2353
|
+
result.pass = true;
|
2354
|
+
result.message = function() { return 'Expected function not to throw, but it threw ' + j$.pp(thrown) + '.'; };
|
2355
|
+
|
2356
|
+
return result;
|
2357
|
+
}
|
2358
|
+
|
2359
|
+
if (util.equals(thrown, expected)) {
|
2360
|
+
result.pass = true;
|
2361
|
+
result.message = function() { return 'Expected function not to throw ' + j$.pp(expected) + '.'; };
|
2362
|
+
} else {
|
2363
|
+
result.message = function() { return 'Expected function to throw ' + j$.pp(expected) + ', but it threw ' + j$.pp(thrown) + '.'; };
|
2364
|
+
}
|
2365
|
+
|
2366
|
+
return result;
|
2367
|
+
}
|
2368
|
+
};
|
2369
|
+
}
|
2370
|
+
|
2371
|
+
return toThrow;
|
2372
|
+
};
|
2373
|
+
|
2374
|
+
getJasmineRequireObj().toThrowError = function(j$) {
|
2375
|
+
function toThrowError (util) {
|
2376
|
+
return {
|
2377
|
+
compare: function(actual) {
|
2378
|
+
var threw = false,
|
2379
|
+
pass = {pass: true},
|
2380
|
+
fail = {pass: false},
|
2381
|
+
thrown,
|
2382
|
+
errorType,
|
2383
|
+
message,
|
2384
|
+
regexp,
|
2385
|
+
name,
|
2386
|
+
constructorName;
|
2387
|
+
|
2388
|
+
if (typeof actual != 'function') {
|
2389
|
+
throw new Error('Actual is not a Function');
|
2390
|
+
}
|
2391
|
+
|
2392
|
+
extractExpectedParams.apply(null, arguments);
|
2393
|
+
|
2394
|
+
try {
|
2395
|
+
actual();
|
2396
|
+
} catch (e) {
|
2397
|
+
threw = true;
|
2398
|
+
thrown = e;
|
2399
|
+
}
|
2400
|
+
|
2401
|
+
if (!threw) {
|
2402
|
+
fail.message = 'Expected function to throw an Error.';
|
2403
|
+
return fail;
|
2404
|
+
}
|
2405
|
+
|
2406
|
+
if (!(thrown instanceof Error)) {
|
2407
|
+
fail.message = function() { return 'Expected function to throw an Error, but it threw ' + j$.pp(thrown) + '.'; };
|
2408
|
+
return fail;
|
2409
|
+
}
|
2410
|
+
|
2411
|
+
if (arguments.length == 1) {
|
2412
|
+
pass.message = 'Expected function not to throw an Error, but it threw ' + fnNameFor(thrown) + '.';
|
2413
|
+
return pass;
|
2414
|
+
}
|
2415
|
+
|
2416
|
+
if (errorType) {
|
2417
|
+
name = fnNameFor(errorType);
|
2418
|
+
constructorName = fnNameFor(thrown.constructor);
|
2419
|
+
}
|
2420
|
+
|
2421
|
+
if (errorType && message) {
|
2422
|
+
if (thrown.constructor == errorType && util.equals(thrown.message, message)) {
|
2423
|
+
pass.message = function() { return 'Expected function not to throw ' + name + ' with message ' + j$.pp(message) + '.'; };
|
2424
|
+
return pass;
|
2425
|
+
} else {
|
2426
|
+
fail.message = function() { return 'Expected function to throw ' + name + ' with message ' + j$.pp(message) +
|
2427
|
+
', but it threw ' + constructorName + ' with message ' + j$.pp(thrown.message) + '.'; };
|
2428
|
+
return fail;
|
2429
|
+
}
|
2430
|
+
}
|
2431
|
+
|
2432
|
+
if (errorType && regexp) {
|
2433
|
+
if (thrown.constructor == errorType && regexp.test(thrown.message)) {
|
2434
|
+
pass.message = function() { return 'Expected function not to throw ' + name + ' with message matching ' + j$.pp(regexp) + '.'; };
|
2435
|
+
return pass;
|
2436
|
+
} else {
|
2437
|
+
fail.message = function() { return 'Expected function to throw ' + name + ' with message matching ' + j$.pp(regexp) +
|
2438
|
+
', but it threw ' + constructorName + ' with message ' + j$.pp(thrown.message) + '.'; };
|
2439
|
+
return fail;
|
2440
|
+
}
|
2441
|
+
}
|
2442
|
+
|
2443
|
+
if (errorType) {
|
2444
|
+
if (thrown.constructor == errorType) {
|
2445
|
+
pass.message = 'Expected function not to throw ' + name + '.';
|
2446
|
+
return pass;
|
2447
|
+
} else {
|
2448
|
+
fail.message = 'Expected function to throw ' + name + ', but it threw ' + constructorName + '.';
|
2449
|
+
return fail;
|
2450
|
+
}
|
2451
|
+
}
|
2452
|
+
|
2453
|
+
if (message) {
|
2454
|
+
if (thrown.message == message) {
|
2455
|
+
pass.message = function() { return 'Expected function not to throw an exception with message ' + j$.pp(message) + '.'; };
|
2456
|
+
return pass;
|
2457
|
+
} else {
|
2458
|
+
fail.message = function() { return 'Expected function to throw an exception with message ' + j$.pp(message) +
|
2459
|
+
', but it threw an exception with message ' + j$.pp(thrown.message) + '.'; };
|
2460
|
+
return fail;
|
2461
|
+
}
|
2462
|
+
}
|
2463
|
+
|
2464
|
+
if (regexp) {
|
2465
|
+
if (regexp.test(thrown.message)) {
|
2466
|
+
pass.message = function() { return 'Expected function not to throw an exception with a message matching ' + j$.pp(regexp) + '.'; };
|
2467
|
+
return pass;
|
2468
|
+
} else {
|
2469
|
+
fail.message = function() { return 'Expected function to throw an exception with a message matching ' + j$.pp(regexp) +
|
2470
|
+
', but it threw an exception with message ' + j$.pp(thrown.message) + '.'; };
|
2471
|
+
return fail;
|
2472
|
+
}
|
2473
|
+
}
|
2474
|
+
|
2475
|
+
function fnNameFor(func) {
|
2476
|
+
return func.name || func.toString().match(/^\s*function\s*(\w*)\s*\(/)[1];
|
2477
|
+
}
|
2478
|
+
|
2479
|
+
function extractExpectedParams() {
|
2480
|
+
if (arguments.length == 1) {
|
2481
|
+
return;
|
2482
|
+
}
|
2483
|
+
|
2484
|
+
if (arguments.length == 2) {
|
2485
|
+
var expected = arguments[1];
|
2486
|
+
|
2487
|
+
if (expected instanceof RegExp) {
|
2488
|
+
regexp = expected;
|
2489
|
+
} else if (typeof expected == 'string') {
|
2490
|
+
message = expected;
|
2491
|
+
} else if (checkForAnErrorType(expected)) {
|
2492
|
+
errorType = expected;
|
2493
|
+
}
|
2494
|
+
|
2495
|
+
if (!(errorType || message || regexp)) {
|
2496
|
+
throw new Error('Expected is not an Error, string, or RegExp.');
|
2497
|
+
}
|
2498
|
+
} else {
|
2499
|
+
if (checkForAnErrorType(arguments[1])) {
|
2500
|
+
errorType = arguments[1];
|
2501
|
+
} else {
|
2502
|
+
throw new Error('Expected error type is not an Error.');
|
2503
|
+
}
|
2504
|
+
|
2505
|
+
if (arguments[2] instanceof RegExp) {
|
2506
|
+
regexp = arguments[2];
|
2507
|
+
} else if (typeof arguments[2] == 'string') {
|
2508
|
+
message = arguments[2];
|
2509
|
+
} else {
|
2510
|
+
throw new Error('Expected error message is not a string or RegExp.');
|
2511
|
+
}
|
2512
|
+
}
|
2513
|
+
}
|
2514
|
+
|
2515
|
+
function checkForAnErrorType(type) {
|
2516
|
+
if (typeof type !== 'function') {
|
2517
|
+
return false;
|
2518
|
+
}
|
2519
|
+
|
2520
|
+
var Surrogate = function() {};
|
2521
|
+
Surrogate.prototype = type.prototype;
|
2522
|
+
return (new Surrogate()) instanceof Error;
|
2523
|
+
}
|
2524
|
+
}
|
2525
|
+
};
|
2526
|
+
}
|
2527
|
+
|
2528
|
+
return toThrowError;
|
2529
|
+
};
|
2530
|
+
|
2531
|
+
getJasmineRequireObj().interface = function(jasmine, env) {
|
2532
|
+
var jasmineInterface = {
|
2533
|
+
describe: function(description, specDefinitions) {
|
2534
|
+
return env.describe(description, specDefinitions);
|
2535
|
+
},
|
2536
|
+
|
2537
|
+
xdescribe: function(description, specDefinitions) {
|
2538
|
+
return env.xdescribe(description, specDefinitions);
|
2539
|
+
},
|
2540
|
+
|
2541
|
+
it: function(desc, func) {
|
2542
|
+
return env.it(desc, func);
|
2543
|
+
},
|
2544
|
+
|
2545
|
+
xit: function(desc, func) {
|
2546
|
+
return env.xit(desc, func);
|
2547
|
+
},
|
2548
|
+
|
2549
|
+
beforeEach: function(beforeEachFunction) {
|
2550
|
+
return env.beforeEach(beforeEachFunction);
|
2551
|
+
},
|
2552
|
+
|
2553
|
+
afterEach: function(afterEachFunction) {
|
2554
|
+
return env.afterEach(afterEachFunction);
|
2555
|
+
},
|
2556
|
+
|
2557
|
+
expect: function(actual) {
|
2558
|
+
return env.expect(actual);
|
2559
|
+
},
|
2560
|
+
|
2561
|
+
pending: function() {
|
2562
|
+
return env.pending();
|
2563
|
+
},
|
2564
|
+
|
2565
|
+
spyOn: function(obj, methodName) {
|
2566
|
+
return env.spyOn(obj, methodName);
|
2567
|
+
},
|
2568
|
+
|
2569
|
+
jsApiReporter: new jasmine.JsApiReporter({
|
2570
|
+
timer: new jasmine.Timer()
|
2571
|
+
}),
|
2572
|
+
|
2573
|
+
jasmine: jasmine
|
2574
|
+
};
|
2575
|
+
|
2576
|
+
jasmine.addCustomEqualityTester = function(tester) {
|
2577
|
+
env.addCustomEqualityTester(tester);
|
2578
|
+
};
|
2579
|
+
|
2580
|
+
jasmine.addMatchers = function(matchers) {
|
2581
|
+
return env.addMatchers(matchers);
|
2582
|
+
};
|
2583
|
+
|
2584
|
+
jasmine.clock = function() {
|
2585
|
+
return env.clock;
|
2586
|
+
};
|
2587
|
+
|
2588
|
+
return jasmineInterface;
|
2589
|
+
};
|
2590
|
+
|
2591
|
+
getJasmineRequireObj().version = function() {
|
2592
|
+
return '2.0.2';
|
2593
|
+
};
|