FunctionalTestSerializer.js 797 B

12345678910111213141516171819202122232425262728
  1. const makeId = require("../../util/makeId");
  2. const oneFunctionalTestSerializer = require("./OneFunctionalSerializer");
  3. /**
  4. * @description 代码一次功能测试的基本信息
  5. * @typedef {Object} FunctionTestSerializerType
  6. * @property {number | string} id 代码一次功能测试的id
  7. * @property {number} time 测试时间
  8. * @property {number | string} deployId 对应的部署id
  9. * @property {oneFunctionalTestSerializer[]} detail 未通过的测试用例列表
  10. */
  11. /**
  12. * @description 生成代码构建信息
  13. * @returns {FunctionTestSerializerType}
  14. */
  15. module.exports = () => {
  16. return {
  17. id: makeId(),
  18. time: 3,
  19. deployId: makeId(),
  20. detail: [
  21. oneFunctionalTestSerializer(),
  22. oneFunctionalTestSerializer(),
  23. oneFunctionalTestSerializer()
  24. ]
  25. };
  26. };