Bug 1326534 - Add test for assert.array; r=automatedtester
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 30 Dec 2016 11:30:05 +0000
changeset 353413 9f4a0309be79975ed2df94931487a63cb6a8a6ca
parent 353412 2e5abb84b0a63fce281d34b2f05902bf3f10c50d
child 353414 69e23d3c9198e9534f43e197c640945f6d2212dc
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1326534
milestone52.0a2
Bug 1326534 - Add test for assert.array; r=automatedtester MozReview-Commit-ID: IWUnhCgPp1R
testing/marionette/test_assert.js
--- a/testing/marionette/test_assert.js
+++ b/testing/marionette/test_assert.js
@@ -71,16 +71,25 @@ add_test(function test_object() {
   assert.object(new Object());
   for (let typ of [42, "foo", true, null, undefined]) {
     Assert.throws(() => assert.object(typ), InvalidArgumentError);
   }
 
   run_next_test();
 });
 
+add_test(function test_array() {
+  assert.array([]);
+  assert.array(new Array());
+  Assert.throws(() => assert.array(42), InvalidArgumentError);
+  Assert.throws(() => assert.array({}), InvalidArgumentError);
+
+  run_next_test();
+});
+
 add_test(function test_that() {
   equal(1, assert.that(n => n + 1)(1));
   Assert.throws(() => assert.that(() => false)());
   Assert.throws(() => assert.that(val => val)(false));
   Assert.throws(() => assert.that(val => val, "foo", SessionNotCreatedError)(false),
       SessionNotCreatedError);
 
   run_next_test();