dareid/chakram

Invalid validation keywords and types

開放

#27 建立於 2015年11月26日

 (4 則留言) (0 個反應) (0 位負責人)JavaScript (100 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (907 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

    it("should list all avilable players", function () {
        var responseStructure = {
            type: "array",
            properties:{
                enabled : {type:"string"},  //This is expected to be an integer, but test passes
                defaultLanguage :{type:"integer"},
                defaultCurrency :{type:"integer"},
                lastname :{type:"string"},
                firstname:{type:"string"},
                passwordSalt:{type:"string"},
                password:{type:"string"},
                email:{type:"string"},
                id:{type:"string"} //Also this, expected to be an integer, but it passes the test
            }
        }
        var response = chakram.get(endpoint);
        return expect(response).to.have.schema(playerDataStructure);

I observed that the properties are not checked even when the properties expected doesn't match the types in the reponse, the test still passes.

貢獻者指南