mirror of
https://github.com/django/django.git
synced 2025-08-01 17:42:56 +00:00
DEP 0003 -- Added JavaScript unit tests.
Setup QUnit, added tests, and measured test coverage. Thanks to Nick Sanford for the initial tests.
This commit is contained in:
parent
3bbaf84d65
commit
2d0dead224
19 changed files with 4716 additions and 2 deletions
28
js_tests/admin/timeparse.test.js
Normal file
28
js_tests/admin/timeparse.test.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
module('admin.timeparse');
|
||||
|
||||
test('parseTimeString', function(assert) {
|
||||
function time(then, expected) {
|
||||
assert.equal(parseTimeString(then), expected);
|
||||
}
|
||||
time('9', '09:00');
|
||||
time('09', '09:00');
|
||||
time('13:00', '13:00');
|
||||
time('13.00', '13:00');
|
||||
time('9:00', '09:00');
|
||||
time('9.00', '09:00');
|
||||
time('3 am', '03:00');
|
||||
time('3 a.m.', '03:00');
|
||||
time('12 am', '00:00');
|
||||
time('11 am', '11:00');
|
||||
time('12 pm', '12:00');
|
||||
time('3am', '03:00');
|
||||
time('3.30 am', '03:30');
|
||||
time('3:15 a.m.', '03:15');
|
||||
time('3.00am', '03:00');
|
||||
time('12.00am', '00:00');
|
||||
time('11.00am', '11:00');
|
||||
time('12.00pm', '12:00');
|
||||
time('noon', '12:00');
|
||||
time('midnight', '00:00');
|
||||
time('something else', 'something else');
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue