balderdashy / waterline-adapter-tests

API integration tests for Waterline adapters
MIT License
16 stars 41 forks source link

30: replace assert(a === b) for assert.equal(a, b) #69

Closed dmarcelino closed 9 years ago

dmarcelino commented 9 years ago

Fixes #30 by replacing instances of assert(a === b) for assert.equal(a, b). For those curious this was done with sed:

find . -name '*.js' -type f -print0 | xargs -0 sed -i '' 's/assert(\([^|&]*\) ===\([^|&]*\))/assert.equal(\1,\2)/g'

I've checked the number of tests ran was the same before and after the change and visually inspected all changes so we should be good.

Original issue:

Specifically, assert.equal should always be used with strings. Some string comparisons will fail triple-equality check. I've run into this in getting the tests to pass in the couch adapter.

From a UX perspective, the methods will produce more helpful and descriptive failure messages.

cc: @tjwebb, @devinivy

devinivy commented 9 years ago

Love it. This was needing to be done!

dmarcelino commented 9 years ago

@devinivy, I've improved on this in PR #70, please check it out. Closing this one.

dmarcelino commented 9 years ago

Files changed 69

I've just realised that PR #69 changed 69 files, brilliant! :laughing: