diff options
| author | Peter Bacon Darwin | 2014-02-21 21:36:22 +0000 | 
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-22 10:07:31 +0000 | 
| commit | b72ea59019b7c61973f3d4443d7b9c4cb94633a9 (patch) | |
| tree | b8d39913869494456bb5bf6bb415eccd70fdca08 | |
| parent | 3b5480e9fc66fb13dc4723c0c836564a6d1aaaf3 (diff) | |
| download | angular.js-b72ea59019b7c61973f3d4443d7b9c4cb94633a9.tar.bz2 | |
chore(docs-app): re-activate docs-app test tasks
Currently there is only a minimal test spec in place. But this will now
be run as part of the test tasks.
| -rw-r--r-- | Gruntfile.js | 18 | ||||
| -rwxr-xr-x | gen_docs.sh | 19 | ||||
| -rwxr-xr-x | jenkins_build.sh | 6 | ||||
| -rw-r--r-- | karma-docs.conf.js | 23 | ||||
| -rwxr-xr-x | scripts/travis/build.sh | 2 | 
5 files changed, 11 insertions, 57 deletions
| diff --git a/Gruntfile.js b/Gruntfile.js index a5a611ec..01dbb952 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -23,7 +23,7 @@ module.exports = function(grunt) {      parallel: {        travis: {          tasks: [ -          util.parallelTask(['test:unit', 'test:promises-aplus'/*, 'tests:docs'*/], {stream: true}), +          util.parallelTask(['test:unit', 'test:promises-aplus', 'tests:docs'], {stream: true}),            util.parallelTask(['test:e2e'])          ]        } @@ -77,7 +77,7 @@ module.exports = function(grunt) {      tests: {        jqlite: 'karma-jqlite.conf.js',        jquery: 'karma-jquery.conf.js', -      //docs: 'karma-docs.conf.js', +      docs: 'karma-docs.conf.js',        modules: 'karma-modules.conf.js'      }, @@ -86,7 +86,7 @@ module.exports = function(grunt) {        jqlite: 'karma-jqlite.conf.js',        jquery: 'karma-jquery.conf.js',        modules: 'karma-modules.conf.js', -      //docs: 'karma-docs.conf.js' +      docs: 'karma-docs.conf.js'      }, @@ -217,14 +217,6 @@ module.exports = function(grunt) {      }, -    // docs: { -    //   process: ['build/docs/*.html', 'build/docs/.htaccess'] -    // }, - -    "jasmine_node": { -      projectRoot: 'docs/spec' -    }, -      "ddescribe-iit": {        files: [          'test/**/*.js', @@ -286,11 +278,11 @@ module.exports = function(grunt) {    //alias tasks -  grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['jshint', 'package','test:unit','test:promises-aplus'/*, 'tests:docs'*/, 'test:protractor']); +  grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['jshint', 'package','test:unit','test:promises-aplus', 'tests:docs', 'test:protractor']);    grunt.registerTask('test:jqlite', 'Run the unit tests with Karma' , ['tests:jqlite']);    grunt.registerTask('test:jquery', 'Run the jQuery unit tests with Karma', ['tests:jquery']);    grunt.registerTask('test:modules', 'Run the Karma module tests with Karma', ['tests:modules']); -  grunt.registerTask('test:docs', 'Run the doc-page tests with Karma', ['package'/*, 'tests:docs'*/]); +  grunt.registerTask('test:docs', 'Run the doc-page tests with Karma', ['package', 'tests:docs']);    grunt.registerTask('test:unit', 'Run unit, jQuery and Karma module tests with Karma', ['tests:jqlite', 'tests:jquery', 'tests:modules']);    grunt.registerTask('test:protractor', 'Run the end to end tests with Protractor and keep a test server running in the background', ['webdriver', 'connect:testserver', 'protractor:normal']);    grunt.registerTask('test:travis-protractor', 'Run the end to end tests with Protractor for Travis CI builds', ['connect:testserver', 'protractor:travis']); diff --git a/gen_docs.sh b/gen_docs.sh deleted file mode 100755 index 039daa46..00000000 --- a/gen_docs.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -JASMINE_NODE='jasmine-node' -local_jasmine='./node_modules/.bin/jasmine-node' - -if ! type -p "$JASMINE_NODE" >/dev/null 2>&1;then -  if [[ -x "$local_jasmine" ]];then -    JASMINE_NODE="$local_jasmine" -  else -    echo 'Could not find a locally or globally installed executable of' \ -         'jasmine-node. Try: `npm install jasmine-node`.' >&2 -    exit 1 -  fi -fi - -if [[ ! -e gen_docs.disable ]]; then -  echo 'Testing, then building documentation...' -  "$JASMINE_NODE" docs/spec --noColor && node docs/src/gen-docs.js -fi diff --git a/jenkins_build.sh b/jenkins_build.sh index 2dc69cbc..806eb0f2 100755 --- a/jenkins_build.sh +++ b/jenkins_build.sh @@ -24,15 +24,15 @@ grunt ci-checks package --no-color  mkdir -p test_out -# DOCS generator unit tests # -grunt test:docgen --no-color -  # UNIT TESTS #  grunt test:unit --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color  # END TO END TESTS #  grunt test:ci-protractor +# DOCS APP TESTS # +grunt test:docs --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color +  # Promises/A+ TESTS #  grunt test:promises-aplus --no-color diff --git a/karma-docs.conf.js b/karma-docs.conf.js index c27e3397..ea9dfb26 100644 --- a/karma-docs.conf.js +++ b/karma-docs.conf.js @@ -5,29 +5,10 @@ module.exports = function(config) {    config.set({      files: [ -      'build/docs/components/jquery.js', -      'test/jquery_remove.js', -        'build/angular.js', -      'build/angular-cookies.js', -      'build/angular-resource.js', -      'build/angular-touch.js', -      'build/angular-sanitize.js', -      'build/angular-route.js', -      'build/angular-animate.js',        'build/angular-mocks.js', - -      'build/docs/components/lunr.js', -      'build/docs/components/google-code-prettify.js', -      'build/docs/components/marked.js', - -      'build/docs/components/angular-bootstrap.js', -      'build/docs/components/angular-bootstrap-prettify.js', -      'build/docs/js/docs.js', -      'build/docs/docs-data.js', - -      'docs/component-spec/mocks.js', -      'docs/component-spec/*.js' +      'docs/app/src/**/*.js', +      'docs/app/test/**/*Spec.js'      ],      junitReporter: { diff --git a/scripts/travis/build.sh b/scripts/travis/build.sh index 34422648..79fa7715 100755 --- a/scripts/travis/build.sh +++ b/scripts/travis/build.sh @@ -6,9 +6,9 @@ export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`  if [ $JOB = "unit" ]; then    grunt ci-checks -  #grunt test:docgen    grunt test:promises-aplus    grunt test:unit --browsers SL_Chrome,SL_Safari,SL_Firefox,SL_IE_8,SL_IE_9,SL_IE_10,SL_IE_11 --reporters dots +  grunt test:docs --browsers SL_Chrome,SL_Safari,SL_Firefox,SL_IE_8,SL_IE_9,SL_IE_10,SL_IE_11 --reporters dots  elif [ $JOB = "e2e" ]; then    export TARGET_SPECS="build/docs/ptore2e/**/*jqlite_test.js"    if [ $TEST_TARGET = "jquery" ]; then | 
