WeTransfer / Mocker

Mock Alamofire and URLSession requests without touching your code implementation
MIT License
1.1k stars 96 forks source link

Sort HTTP methods to remove randomness from keys #149

Closed Chewie69006 closed 1 year ago

Chewie69006 commented 1 year ago

Hello !

As data.keys returns in a random order, comparing 2 arrays containing same objects in different order make it return false. This way, it will return true as they will be sorted.

wetransferplatform commented 1 year ago
Warnings
:warning: Consider to place some `MARK:` lines for Sources/Mocker/Mock.swift, which is over 300 lines big.
Messages
:book: View more details on Bitrise

SwiftLint found issues

Severity File Reason
Warning MockTests.swift:10 Imports should be sorted (sorted_imports)
Warning MockTests.swift:35 Lines should not have trailing whitespace (trailing_whitespace)
Warning MockTests.swift:38 Lines should not have trailing whitespace (trailing_whitespace)
Warning Mock.swift:9 The disabled 'force_unwrapping' rule should be re-enabled before the end of the file (blanket_disable_command)
Warning Mock.swift:93 Computed properties should first declare the getter and then the setter (computed_accessors_order)
Error Mock.swift:111 Prefer checking isEmpty over comparing count to zero (empty_count)
Error Mock.swift:8 Line should be 160 characters or less; currently it has 177 characters (line_length)
Error Mock.swift:38 Line should be 160 characters or less; currently it has 195 characters (line_length)
Warning Mock.swift:55 Line should be 140 characters or less; currently it has 155 characters (line_length)
Error Mock.swift:87 Line should be 160 characters or less; currently it has 211 characters (line_length)
Error Mock.swift:90 Line should be 160 characters or less; currently it has 208 characters (line_length)
Error Mock.swift:101 Line should be 160 characters or less; currently it has 217 characters (line_length)
Error Mock.swift:110 Line should be 160 characters or less; currently it has 297 characters (line_length)
Warning Mock.swift:116 Line should be 140 characters or less; currently it has 152 characters (line_length)
Warning Mock.swift:156 Line should be 140 characters or less; currently it has 141 characters (line_length)
Error Mock.swift:159 Line should be 160 characters or less; currently it has 171 characters (line_length)
Warning Mock.swift:178 Line should be 140 characters or less; currently it has 141 characters (line_length)
Warning Mock.swift:185 Line should be 140 characters or less; currently it has 142 characters (line_length)
Error Mock.swift:186 Line should be 160 characters or less; currently it has 246 characters (line_length)
Warning Mock.swift:204 Line should be 140 characters or less; currently it has 141 characters (line_length)
Error Mock.swift:206 Line should be 160 characters or less; currently it has 171 characters (line_length)
Error Mock.swift:211 Line should be 160 characters or less; currently it has 256 characters (line_length)
Warning Mock.swift:234 Line should be 140 characters or less; currently it has 150 characters (line_length)
Error Mock.swift:249 Line should be 160 characters or less; currently it has 171 characters (line_length)
Warning Mock.swift:253 Line should be 140 characters or less; currently it has 160 characters (line_length)
Warning Mock.swift:268 Line should be 140 characters or less; currently it has 141 characters (line_length)
Error Mock.swift:270 Line should be 160 characters or less; currently it has 171 characters (line_length)
Error Mock.swift:275 Line should be 160 characters or less; currently it has 262 characters (line_length)
Warning Mock.swift:326 Line should be 140 characters or less; currently it has 159 characters (line_length)
Error Mock.swift:336 Line should be 160 characters or less; currently it has 168 characters (line_length)
Warning Mock.swift:129 Use shorthand syntax for optional binding (shorthand_optional_binding)
Warning Mock.swift:338 Use shorthand syntax for optional binding (shorthand_optional_binding)
Warning Mock.swift:338 Use shorthand syntax for optional binding (shorthand_optional_binding)
Warning Mock.swift:42 Lines should not have trailing whitespace (trailing_whitespace)
Warning Mock.swift:114 Lines should not have trailing whitespace (trailing_whitespace)
Warning Mock.swift:155 Lines should not have trailing whitespace (trailing_whitespace)
Warning Mock.swift:199 Lines should not have trailing whitespace (trailing_whitespace)
Warning Mock.swift:224 Lines should not have trailing whitespace (trailing_whitespace)
Warning Mock.swift:244 Lines should not have trailing whitespace (trailing_whitespace)
Warning Mock.swift:263 Lines should not have trailing whitespace (trailing_whitespace)

Generated by :no_entry_sign: Danger Swift against e08d07a249f1f582b617c74b0677d92edb8cef44

AvdLee commented 1 year ago

@Chewie69006 thanks for writing the test, great job! Let's wait for one more review and we can merge.

BasThomas commented 1 year ago

Looks like your commit adding the test isn't signed, which blocks us from merging. Can you take care of that, @Chewie69006? Let us know if we can help.

Chewie69006 commented 1 year ago

When do you think a new tag will be delivered ?

wetransferplatform commented 8 months ago

Congratulations! :tada: This was released as part of Release 3.0.2 :rocket:

Generated by GitBuddy