Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tests.ts 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import extend = require("./index");
  2. // OK
  3. // Pass single `object`.
  4. extend({});
  5. extend([]);
  6. extend(() => {});
  7. // Pass single `object`, then `any`.
  8. extend({}, 0);
  9. extend({}, "");
  10. extend({}, false);
  11. extend({}, null);
  12. extend({}, undefined);
  13. extend({}, {});
  14. extend({}, []);
  15. extend({}, () => {});
  16. // Pass variadic args.
  17. extend({}, 0, "", false, null, undefined, {}, [], () => {});
  18. // Pass `boolean`, then single `object`.
  19. extend(true, {});
  20. extend(true, []);
  21. extend(true, () => {});
  22. // Pass `boolean`, single `object`, then `any`.
  23. extend(true, {}, 0);
  24. extend(true, {}, "");
  25. extend(true, {}, false);
  26. extend(true, {}, null);
  27. extend(true, {}, undefined);
  28. extend(true, {}, {});
  29. extend(true, {}, []);
  30. extend(true, {}, () => {});
  31. // Pass `boolean`, then variadic args.
  32. extend(true, {}, 0, "", false, null, undefined, {}, [], () => {});
  33. // Not OK
  34. // Incorrect extendee `object`.
  35. // @ts-expect-error
  36. extend();
  37. // @ts-expect-error
  38. extend(0);
  39. // @ts-expect-error
  40. extend("");
  41. // @ts-expect-error
  42. extend(false);
  43. // @ts-expect-error
  44. extend();
  45. // @ts-expect-error
  46. extend(true, 0);
  47. // @ts-expect-error
  48. extend(true, "");
  49. // @ts-expect-error
  50. extend(true, false);
  51. // @ts-expect-error
  52. extend(true);