Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.11/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 42, in incremental_tests
test.assert_equals(sum_previous_odd_of(i), r, f"given {i} should return {r}")
^
NameError: name 'i' is not defined
ReferenceError: getNextChar is not defined
at _getNextChar (/workspace/node/test.js:116:5)
at _solution (/workspace/node/test.js:140:3)
at Suite.<anonymous> (/workspace/node/test.js:152:22)
at Object.create (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/common.js:148:19)
at context.describe.context.context (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at Suite.<anonymous> (/workspace/node/test.js:148:3)
at Object.create (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/common.js:148:19)
at context.describe.context.context (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at /workspace/node/test.js:145:1
at Object.<anonymous> (/workspace/node/test.js:159:3)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
at async formattedImport (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
at async exports.requireOrImport (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
at async exports.loadFilesAsync (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async exports.handler (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/cli/run.js:370:5)
Please do not mark this issue as resolved until someone can confirm the fix.
ReferenceError: getNextChar is not defined
at _getNextChar (/workspace/node/test.js:111:5)
at _solution (/workspace/node/test.js:135:3)
at Suite.<anonymous> (/workspace/node/test.js:147:22)
at Object.create (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/common.js:148:19)
at context.describe.context.context (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at Suite.<anonymous> (/workspace/node/test.js:143:3)
at Object.create (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/common.js:148:19)
at context.describe.context.context (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at /workspace/node/test.js:140:1
at Object.<anonymous> (/workspace/node/test.js:154:3)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
at async formattedImport (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
at async exports.requireOrImport (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
at async exports.loadFilesAsync (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async exports.handler (/workspace/node/node_modules/.pnpm/mocha@10.2.0/node_modules/mocha/lib/cli/run.js:370:5)
Wow hahaha I wasn't expecting it again haha! Do you know how can I avoid it?
Thank you! I have just fixed it!
I was think about change the array prototype 🤔
But I'm not sure if it'll work!
Incremental tests:
It was amazing hahaha! Do you know how can I avoid it?
Wow hahaha I wasn't expecting something like that!
Beautiful code haha
Okay thanks. It works now. ✅
😥 Sorry about that, it was my bad. Could you try now I think there was a missing variable!
Still broken!
Please do not mark this issue as resolved until someone can confirm the fix.
💖 Sorry about that I was trying to create random tests it should be fixed now!
JS version is still broken:
I still get this error:
I'm sure you know better than me. I was able to copy paste the algorithm from that kata here though.
They are completly different challanges! This challange is like a counter and have differents inputs and ouputs!
Loading more items...