In https://github.com/mongodb/specifications/blob/master/source/bson-corpus/tests/code.json starting with the fourth test (line 21 and following), the tests switch from correctly testing BSON type 0x0D (JavaScript code) to incorrectly testing BSON type 0x02 (regular strings).
Unfortunately, the comparison canonical_extjson seems to have been generated from the BSON, meaning that the tests succeed for the wrong reason -- they are regular string tests, not code tests.
Likewise, all of the decodeErrors tests are for regular strings, not code, despite the descriptions.