Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1948)

Unified Diff: Tools/GardeningServer/ui/test/ct-commit-tests.html

Issue 462453002: Sheriff-O-Matic: Transition more unit tests to mocha. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and fix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/ui/test/ct-commit-tests.html
diff --git a/Tools/GardeningServer/ui/ct-commit-tests.html b/Tools/GardeningServer/ui/test/ct-commit-tests.html
similarity index 25%
rename from Tools/GardeningServer/ui/ct-commit-tests.html
rename to Tools/GardeningServer/ui/test/ct-commit-tests.html
index 5faafe923fe30189f78e1449789dda164b0d679e..2154f3c447ef474ed909f46da76489d25d07eb03 100644
--- a/Tools/GardeningServer/ui/ct-commit-tests.html
+++ b/Tools/GardeningServer/ui/test/ct-commit-tests.html
@@ -4,28 +4,33 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
-<link rel="import" href="ct-commit.html">
+<link rel="import" href="../ct-commit.html">
-<link rel="import" href="../model/ct-commit-mock.html">
+<link rel="import" href="../../model/ct-commit-mock.html">
<script>
(function () {
-module("ct-commit");
+var assert = chai.assert;
-asyncTest("basic", 3, function() {
- var commit = document.createElement('ct-commit');
+describe('ct-commit', function() {
+ var commit;
- commit.data = new CTCommitMock();
+ beforeEach(function(done) {
+ commit = document.createElement('ct-commit');
+ commit.data = new CTCommitMock();
- requestAnimationFrame(function() {
- var html = commit.shadowRoot.innerHTML;
+ setTimeout(done);
+ });
- equal(html.indexOf('mkwst') != -1, true);
- equal(html.indexOf('behavior for these types') != -1, true);
- equal(commit.shadowRoot.querySelector('a').href, commit.data.url);
+ describe('commit UI', function() {
+ it('should show example commit', function() {
+ var html = commit.shadowRoot.innerHTML;
- start();
+ assert.include(html, 'mkwst');
+ assert.include(html, 'behavior for these types');
+ assert.equal(commit.shadowRoot.querySelector('a').href, commit.data.url);
+ });
});
});

Powered by Google App Engine
This is Rietveld 408576698