Add tests for TestGroup objects so that we can catch regressions like the ones fixed in r198503 in the future.
Created attachment 274721 [details] Adds tests
Comment on attachment 274721 [details] Adds tests View in context: https://bugs.webkit.org/attachment.cgi?id=274721&action=review r=me > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:130 > + it('should create build reuqests for each group', function () { Typo: "reuqests" => "requests" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:213 > + it('should return true if all build requests have been cancled', function () { Typo: "cancled" => "canceled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:238 > + assert.ok(!testGroupWithStatusList(['completed', 'cancled', 'completed', 'running']).hasFinished()); Typo: "cancled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:251 > + it('should return true if all build requests have been cancled', function () { Typo: "cancled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:277 > + it('should return false if some build requests have completed', function () { > + assert.ok(testGroupWithStatusList(['completed', 'pending', 'pending', 'pending']).hasStarted()); > + }); > + > + it('should return false if some build requests are scheduled', function () { > + assert.ok(testGroupWithStatusList(['scheduled', 'pending', 'pending', 'pending']).hasStarted()); > + }); > + > + it('should return false if some build requests are running', function () { > + assert.ok(testGroupWithStatusList(['running', 'pending', 'pending', 'pending']).hasStarted()); > + }); These all assert "true" but the should sentence says false. > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:289 > + it('should return false if all build requests have been cancled', function () { Typo: "cancled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:306 > + assert.ok(testGroupWithStatusList(['completed', 'failed', 'cancled', 'pending']).hasPending()); Typo: "cancled"
Thanks for the review! Will fix those before landing.
Committed r198598: <http://trac.webkit.org/changeset/198598>