Front end of the Slack clone application.

valid-array.js 579B

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. module.exports = function (t, a) {
  3. var x;
  4. a.throws(function () {
  5. t();
  6. }, TypeError, "Undefined");
  7. a.throws(function () {
  8. t(null);
  9. }, TypeError, "Null");
  10. a.throws(function () {
  11. t(0);
  12. }, TypeError, "Number");
  13. a.throws(function () {
  14. t(true);
  15. }, TypeError, "Boolean");
  16. a.throws(function () {
  17. t("raz");
  18. }, TypeError, "String");
  19. a.throws(function () {
  20. t(function () {});
  21. }, TypeError, "Function");
  22. a.throws(function () {
  23. t({});
  24. }, TypeError, "Object");
  25. a.throws(function () {
  26. t({ length: 0 });
  27. }, TypeError, "Array-like");
  28. a(t(x = []), x, "Array");
  29. };