Update syncing script to be able to build binary for commit set with owned commits.
[WebKit.git] / Websites / perf.webkit.org / unit-tests / commit-set-tests.js
index 27c2d9e..ab76d58 100644 (file)
@@ -77,6 +77,11 @@ describe('CustomCommitSet', () => {
             const commitSet = customCommitSetWithoutOwnedCommit();
             assert.deepEqual(commitSet.repositories(), [MockModels.osx, MockModels.webkit]);
         });
+
+        it('should return only top level repositories', () => {
+            const commitSet = customCommitSetWithoutOwnedCommit();
+            assert.deepEqual(commitSet.topLevelRepositories(), [MockModels.osx, MockModels.webkit]);
+        });
     });
 
     describe('Test custom commit set with owned commit', () => {
@@ -105,6 +110,11 @@ describe('CustomCommitSet', () => {
             const commitSet = customCommitSetWithOwnedCommit();
             assert.deepEqual(commitSet.repositories(), [MockModels.osx, MockModels.ownerRepository, MockModels.ownedRepository]);
         });
+
+        it('should return only top level repositories', () => {
+            const commitSet = customCommitSetWithOwnedCommit();
+            assert.deepEqual(commitSet.topLevelRepositories(), [MockModels.osx, MockModels.ownerRepository]);
+        });
     });
 
     describe('Test custom commit set with patch', () => {
@@ -130,6 +140,11 @@ describe('CustomCommitSet', () => {
             const commitSet = customCommitSetWithPatch();
             assert.deepEqual(commitSet.repositories(), [MockModels.osx, MockModels.webkit]);
         });
+
+        it('should return only top level repositories', () => {
+            const commitSet = customCommitSetWithPatch();
+            assert.deepEqual(commitSet.topLevelRepositories(), [MockModels.osx, MockModels.webkit]);
+        });
     });
 
     describe('Test custom commit set with owned repository has same name as non-owned repository',  () => {
@@ -158,6 +173,11 @@ describe('CustomCommitSet', () => {
             const commitSet = customCommitSetWithOwnedRepositoryHasSameNameAsNotOwnedRepository();
             assert.deepEqual(commitSet.repositories(), [MockModels.osx, MockModels.webkit, MockModels.ownedWebkit]);
         });
+
+        it('should return only top level repositories', () => {
+            const commitSet = customCommitSetWithOwnedRepositoryHasSameNameAsNotOwnedRepository();
+            assert.deepEqual(commitSet.topLevelRepositories(), [MockModels.osx, MockModels.webkit]);
+        });
     });
 
     describe('Test custom commit set equality function', () => {