index.test.js 846 B

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. var assert = require("@sinonjs/referee-sinon").assert;
  3. var index = require("./index");
  4. var expectedMethods = [
  5. "calledInOrder",
  6. "className",
  7. "every",
  8. "functionName",
  9. "orderByFirstCall",
  10. "typeOf",
  11. "valueToString",
  12. ];
  13. var expectedObjectProperties = ["deprecated", "prototypes"];
  14. describe("package", function () {
  15. // eslint-disable-next-line mocha/no-setup-in-describe
  16. expectedMethods.forEach(function (name) {
  17. it(`should export a method named ${name}`, function () {
  18. assert.isFunction(index[name]);
  19. });
  20. });
  21. // eslint-disable-next-line mocha/no-setup-in-describe
  22. expectedObjectProperties.forEach(function (name) {
  23. it(`should export an object property named ${name}`, function () {
  24. assert.isObject(index[name]);
  25. });
  26. });
  27. });