diff --git a/docs/internal/testing.md b/docs/internal/testing.md index fa5329be75bc..fb64e18c010b 100644 --- a/docs/internal/testing.md +++ b/docs/internal/testing.md @@ -144,21 +144,21 @@ Very handy: if you uncomment the `pdb=1` line in `setup.cfg`, it will drop you i We use Jasmine to run JavaScript unit tests. To run all the JavaScript tests: - rake js_test + rake test:js To run a specific set of JavaScript tests and print the results to the console: - rake js_test:run[lms] - rake js_test:run[cms] - rake js_test:run[xmodule] - rake js_test:run[common] + rake test:js:run[lms] + rake test:js:run[cms] + rake test:js:run[xmodule] + rake test:js:run[common] To run JavaScript tests in your default browser: - rake js_test:dev[lms] - rake js_test:dev[cms] - rake js_test:dev[xmodule] - rake js_test:dev[common] + rake test:js:dev[lms] + rake test:js:dev[cms] + rake test:js:dev[xmodule] + rake test:js:dev[common] These rake commands call through to a custom test runner. For more info, see [js-test-tool](https://github.com/edx/js-test-tool). diff --git a/rakelib/deprecated.rake b/rakelib/deprecated.rake index 3dd7d07021d0..0251ea5fe8c8 100644 --- a/rakelib/deprecated.rake +++ b/rakelib/deprecated.rake @@ -12,10 +12,10 @@ end [:lms, :cms].each do |system| deprecated("browse_jasmine_#{system}", "jasmine:#{system}:browser") deprecated("phantomjs_jasmine_#{system}", "jasmine:#{system}:phantomjs") - deprecated("jasmine:#{system}", "js_test:dev[#{system}]") - deprecated("jasmine:#{system}:browser", "js_test:dev[#{system}]") - deprecated("jasmine:#{system}:browser:watch", "js_test:dev[#{system}]") - deprecated("jasmine:#{system}:phantomjs", "js_test:run[#{system}]") + deprecated("jasmine:#{system}", "test:js:dev[#{system}]") + deprecated("jasmine:#{system}:browser", "test:js:dev[#{system}]") + deprecated("jasmine:#{system}:browser:watch", "test:js:dev[#{system}]") + deprecated("jasmine:#{system}:phantomjs", "test:js:run[#{system}]") deprecated("#{system}:check_settings:jasmine", "") deprecated("#{system}:gather_assets:jasmine", "") end @@ -27,13 +27,13 @@ end deprecated("browse_jasmine_discussion", "jasmine:common/static/coffee:browser") deprecated("phantomjs_jasmine_discussion", "jasmine:common/static/coffee:phantomjs") -deprecated("jasmine:common/lib/xmodule", "js_test:run[xmodule]") -deprecated("jasmine:common/lib/xmodule:browser", "js_test:dev[xmodule]") -deprecated("jasmine:common/lib/xmodule:phantomjs", "js_test:run[xmodule]") -deprecated("jasmine:common/static/coffee", "js_test:run[common]") -deprecated("jasmine jasmine:common/static/coffee:browser", "js_test:dev[common]") -deprecated("jasmine:common/static/coffee:phantomjs", "js_test:run[common]") +deprecated("jasmine:common/lib/xmodule", "test:js:run[xmodule]") +deprecated("jasmine:common/lib/xmodule:browser", "test:js:dev[xmodule]") +deprecated("jasmine:common/lib/xmodule:phantomjs", "test:js:run[xmodule]") +deprecated("jasmine:common/static/coffee", "test:js:run[common]") +deprecated("jasmine jasmine:common/static/coffee:browser", "test:js:dev[common]") +deprecated("jasmine:common/static/coffee:phantomjs", "test:js:run[common]") -deprecated("jasmine", "js_test:run") -deprecated("jasmine:phantomjs", "js_test:run") -deprecated("jasmine:browser", "js_test:dev") +deprecated("jasmine", "test:js:run") +deprecated("jasmine:phantomjs", "test:js:run") +deprecated("jasmine:browser", "test:js:dev") diff --git a/rakelib/js_test.rake b/rakelib/js_test.rake index c91e323d7f35..6c2bd6c14ae8 100644 --- a/rakelib/js_test.rake +++ b/rakelib/js_test.rake @@ -45,12 +45,12 @@ end # all available environments def print_js_test_cmds(mode) JS_TEST_SUITES.each do |key, val| - puts " rake js_test:#{mode}[#{key}]" + puts " rake test:js:#{mode}[#{key}]" end end -namespace :js_test do +namespace :'test:js' do desc "Run the JavaScript tests and print results to the console" task :run, [:env] => [:clean_test_files, :'assets:coffee'] do |t, args| @@ -79,7 +79,7 @@ end # Default js_test is js_test:run desc "Run all JavaScript tests and print results the the console" -task :js_test => :'js_test:run' +task :'test:js' => :'test:js:run' # Add the JS tests to the main test command -task :test => :'js_test:coverage' +task :test => :'test:js:coverage'