exercism/xjavascript — pull request #36 by glebec (2014-09-08 15:39:17+00:00)
Title: Nucleotide-counts.js spec fix (for false positives) and example.js fix (for correct ntide counts)

The previous refactor for nucleotide-counts introduced an invalid syntax for Jasmine test passing. `expect(a,b)` seems to validate as passing if anything at all is passed into it. Refactored to use `expect(a).toEqual(b)` which correctly checked the input and output and fails the tests if appropriate.

A related issue was that example.js for this exercise did not pass, because of a mismatch between the existing `call.bind(acids, acid)` vs the actual function `call(acids, acid`. The `.bind` was doing nothing here but shifting `acids` into `this` and `acid` into `acids`, resulting in incorrect output. Removing the `.bind` and fixing the count function to offset by 1 gives the correct results.

Finally, this showed that one of the test specs had reversed the counts for C and G. Switched them back and now everything is green.