Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354916 )

Change subject: tests: Cover ve.util#getCommonStartSequenceLength error case
......................................................................

tests: Cover ve.util#getCommonStartSequenceLength error case

Change-Id: I10d44ca7fb475d3287ff8d416bbe9474b0cda748
---
M tests/ve.test.js
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/16/354916/1

diff --git a/tests/ve.test.js b/tests/ve.test.js
index 0b20ffb..3fa01c1 100644
--- a/tests/ve.test.js
+++ b/tests/ve.test.js
@@ -973,6 +973,16 @@
                        test.title
                );
        }
+
+       // Test error case
+       assert.throws(
+               function () {
+                       ve.getCommonStartSequenceLength( [] );
+               },
+               new Error( 'Need at least one sequence' ),
+               'Empty sequence throws'
+       );
+
 } );
 
 QUnit.test( 'adjacentDomPosition', function ( assert ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/354916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10d44ca7fb475d3287ff8d416bbe9474b0cda748
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to