0

我在 busterjs 中运行我的测试,其中一个有错误 - 但我仍然得到一个 0 返回码。这导致我的 CI 服务器在应该为“红色”时将构建状态显示为“绿色”

iMac:tests caseyflynn$ buster test
API GET /users: ..
Module components/apiAuth: .........
Module components/controllers: ....
Module components/routeParrot: ..F.

Deferred: API GET /users GET /api/users "client_super_admin" returns all users for given client
Deferred: API GET /users GET /api/users "super_admin" returns all users
Deferred: API GET /users GET /api/users "client_admin" returns all users for given client
Deferred: API GET /users GET /api/users "client_delegate" returns all users for given client
Deferred: API GET /users GET /api/users "client_auditor" returns all users for given client

Failure: Module components/routeParrot Modifies socket.io request to API
    [assert.calledWith] Expected function spy() {} to be called with arguments { headers: [], method: "get", url: "/api/users" }, { jsonAPIRespond: function () {} }
    spy({
  data: { headers: [], method: "get", url: "/users" },
  headers: [],
  method: "get",
  requestType: "socketio",
  url: "/api/users"
}, { jsonAPIRespond: function () {} })
    at Object.buster.testCase.Modifies socket.io request to API (./componentsTests/routeParrotTest.js:70:21)

4 test cases, 19 tests, 44 assertions, 1 failure, 0 errors, 0 timeouts, 5 deferred
Finished in 0.044s
iMac:tests caseyflynn$ echo $?
0
4

0 回答 0