Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
9801ce5d
Commit
9801ce5d
authored
Jul 06, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation for running JavaScript test
parent
87e612f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
+21
-1
doc/testing.md
+21
-1
No files found.
doc/testing.md
View file @
9801ce5d
...
...
@@ -8,5 +8,25 @@ Testing is good. Here is some useful info about how we set up tests--
### Frontend code:
-
TODO
We're using Jasmine to unit-testing the JavaScript files. All the specs are
written in CoffeeScript for the consistency. To access the test cases, start the
server in debug mode, navigate to
`http://127.0.0.1:[port number]/_jasmine`
to
see the test result.
All the JavaScript codes must have test coverage. Both CMS and LMS
has its own test directory in
`{cms,lms}/static/coffee/spec`
If you haven't
written a JavaScript test before, you can look at those example files as a
starting point. Also, these materials might be helpful for you:
CMS Note: For consistency, you're advised to use the same directory structure
for implementation and test. For example, test for
`src/views/module.coffee`
should be written in
`spec/views/module_spec.coffee`
.
*
http://pivotal.github.com/jasmine
*
http://railscasts.com/episodes/261-testing-javascript-with-jasmine?view=asciicast
*
http://a-developer-life.blogspot.com/2011/05/jasmine-part-1-unit-testing-javascript.html
If you're finishing a feature that contains JavaScript code snippets and do not
sure how to test, please feel free to open up a pull request and asking people
for help. (However, the best way to do it would be writing your test first, then
implement your feature - Test Driven Development.)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment