We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Один из наших тестов фейлится из-за того, что сравнение с IgnoreArraysOrdering периодически неправильно производит сравнение. Проще всего воспроизвести, если в тестах "https://github.com/lamoda/gonkey/blob/master/compare/compare_test.go" поставить :
var complexJson1 = ` { "data": [ { "name": "n222" }, { "name": "n111" } ] } ` var complexJson2 = ` { "data": [ { "message": "m555", "name": "n222" }, { "message": "m777", "name": "n111" } ] } `
и в CompareParams прописать опцию IgnoreArraysOrdering: true.
Ну и в тесте поправить TestCompareEqualComplexJson:
func TestCompareEqualComplexJson(t *testing.T) { var json1, json2 interface{} json.Unmarshal([]byte(complexJson1), &json1) json.Unmarshal([]byte(complexJson1), &json2) <----- тут прописать complexJson2 errors := Compare(json1, json2, CompareParams{}) if len(errors) != 0 { t.Error( "must return no errors", fmt.Sprintf("got result: %v", errors), ) t.Fail() } }
The text was updated successfully, but these errors were encountered:
Исправил алгоритм в #98
Sorry, something went wrong.
fixed in 1.5.0
No branches or pull requests
Один из наших тестов фейлится из-за того, что сравнение с IgnoreArraysOrdering периодически неправильно производит сравнение. Проще всего воспроизвести, если в тестах "https://github.com/lamoda/gonkey/blob/master/compare/compare_test.go" поставить :
и в CompareParams прописать опцию IgnoreArraysOrdering: true.
Ну и в тесте поправить TestCompareEqualComplexJson:
The text was updated successfully, but these errors were encountered: