Bug 155673 - Add unit tests for measurement-set.js and measurement-adapter.js
Summary: Add unit tests for measurement-set.js and measurement-adapter.js
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Perf Dashboard (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-18 17:14 PDT by Ryosuke Niwa
Modified: 2016-03-18 19:50 PDT (History)
7 users (show)

See Also:


Attachments
Adds tests and refactors code (30.69 KB, patch)
2016-03-18 18:52 PDT, Ryosuke Niwa
darin: review+
Details | Formatted Diff | Diff
Add tests for real (25.64 KB, patch)
2016-03-18 19:22 PDT, Ryosuke Niwa
dbates: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2016-03-18 17:14:16 PDT
Add mocha unit tests for measurement-set.js and measurement-adapter.js
as these two files are responsible for fetching and formatting data on v3 UI
and new syncing / regression detection scripts to be (re)written.
Comment 1 Ryosuke Niwa 2016-03-18 18:52:52 PDT
Created attachment 274486 [details]
Adds tests and refactors code
Comment 2 Ryosuke Niwa 2016-03-18 19:17:08 PDT
Thanks for the review!
Comment 3 Ryosuke Niwa 2016-03-18 19:17:50 PDT
Committed r198462: <http://trac.webkit.org/changeset/198462>
Comment 4 Ryosuke Niwa 2016-03-18 19:22:14 PDT
Oops, my patch didn't have actual tests :(
Comment 5 Ryosuke Niwa 2016-03-18 19:22:22 PDT
Created attachment 274491 [details]
Add tests for real
Comment 6 Daniel Bates 2016-03-18 19:42:44 PDT
Comment on attachment 274491 [details]
Add tests for real

View in context: https://bugs.webkit.org/attachment.cgi?id=274491&action=review

rs=me. Feel free to ask someone more familiar with measurement-set.js and measurement-adapter.js for a more through review.

> Websites/perf.webkit.org/unit-tests/measurement-adaptor-tests.js:1
> +'use strict';

This file alternates between using single quoted string literals and double quoted string literals. We should pick one style and stick with it for consistency.

> Websites/perf.webkit.org/unit-tests/measurement-set-tests.js:1
> +'use strict';

This file alternates between using single quoted string literals and double quoted string literals. We should pick one style and stick with it for consistency.
Comment 7 Ryosuke Niwa 2016-03-18 19:49:49 PDT
Will fix. Thanks!
Comment 8 Ryosuke Niwa 2016-03-18 19:50:48 PDT
Committed r198463: <http://trac.webkit.org/changeset/198463>