e}
    });
  }

  for (const tc of testCases) {
    if (tc.result === "throws") {
      assert_throws_js(TypeError, function(){ makeFilter(tc.input) });
    } else {
      ctx.reset();
      ctx.filter = makeFilter(tc.input);
      ctx.fillRect(0, 0, 100, 100);
      _assertPixelApprox(canvas, 5, 5, tc.result,0,0,255, 2);
    }
  }
  t.done();
});
</script>
