#28929 closed Bug (fixed)
Incorrect example JS QUnit test
| Reported by: | Jan Fabry | Owned by: | Junji Wei |
|---|---|---|---|
| Component: | Documentation | Version: | 2.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The example QUnit test code in the "Contributing" part of the documentation uses the wrong kind of assertion. Meta-meta I think, so not important, but it's still an error :-)
...
assert.equal($('.button').length === 1);
...
The assert.equal should either be assert.ok, or it should be assert.equal($('.button').length, 1) (or assert.strictEqual if you want the exact equivalent).
It's also in QUnit 1 format, while Django upgraded to QUnit 2 in https://github.com/django/django/pull/7715, which has a different syntax.
Change History (7)
comment:1 by , 8 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|---|
| Type: | Uncategorized → Bug |
comment:2 by , 8 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
follow-up: 5 comment:4 by , 8 years ago
| Has patch: | set |
|---|---|
| Resolution: | fixed |
| Status: | closed → new |
It will be fixed only when committed into Django master. When a patch is available, just check the "Has patch" box.
comment:5 by , 8 years ago
| Status: | new → assigned |
|---|
Replying to Claude Paroz:
It will be fixed only when committed into Django master. When a patch is available, just check the "Has patch" box.
Sorry, I made a mistake.
pull request in https://github.com/django/django/pull/9474