Ship-it: Introduce some js unit testing

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: sylvestre, Assigned: sylvestre)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

4 years ago
Lately, we introduce quite a few JS functions which could be easily tested.
We are already running Python unit tests with nosetests, we should do the same with js.
(Assignee)

Updated

4 years ago
Assignee: nobody → sledru
(Assignee)

Comment 1

4 years ago
Created attachment 8537873 [details] [diff] [review]
0001-move-populatePartial-outside-of-the-setupVersionSugg.patch

A minor refactoring + a check added
Attachment #8537873 - Flags: review?(bhearsum)
(Assignee)

Comment 2

4 years ago
Created attachment 8537876 [details] [diff] [review]
0002-Bug-1112117-Introduce-a-serie-of-JS-unit-tests.patch

Here are a few js unit test.
I have to dig how to call them from nosetest

For now, the test HTML has to be called with file:///
Attachment #8537876 - Flags: review?(bhearsum)
(In reply to Sylvestre Ledru [:sylvestre] from comment #2)
> Created attachment 8537876 [details] [diff] [review]
> 0002-Bug-1112117-Introduce-a-serie-of-JS-unit-tests.patch
> 
> Here are a few js unit test.
> I have to dig how to call them from nosetest
> 
> For now, the test HTML has to be called with file:///

Nose is specifically for running Python tests, it won't help. It might be nice to have a small wrapper that runs both at some point though. We can run these tests headlessly with phantomjs - which is a basically the webkit JS interpreter with a DOM. This isn't a blocker though.
Attachment #8537873 - Flags: review?(bhearsum) → review+
Comment on attachment 8537876 [details] [diff] [review]
0002-Bug-1112117-Introduce-a-serie-of-JS-unit-tests.patch

Review of attachment 8537876 [details] [diff] [review]:
-----------------------------------------------------------------

::: kickoff/test/jstest.html
@@ +1,1 @@
> +<!DOCTYPE html>

Please put these files in a subdirectory to keep them organized and separate from the python tests. eg, kickoff/test/js. r=me if you fix that on landing.
Attachment #8537876 - Flags: review?(bhearsum) → review+
(Assignee)

Updated

4 years ago
Blocks: 1120826
(Assignee)

Updated

4 years ago
Depends on: 1120589
(Assignee)

Comment 6

4 years ago
deployed.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.