Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/internal/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
26 changes: 13 additions & 13 deletions rakelib/deprecated.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
8 changes: 4 additions & 4 deletions rakelib/js_test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -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'