Ad
  • Custom User Avatar

    The TypeScript tests are broken for this kata. If you simply run the tests without changing anything you get this:

    TSError: ⨯ Unable to compile TypeScript:
    test.ts:7:12 - error TS7019: Rest parameter 'args' implicitly has an 'any[]' type.
    
    7   expect: (...args) => (assert as any)(...args),
                 ~~~~~~~
    test.ts:8:18 - error TS7019: Rest parameter 'args' implicitly has an 'any[]' type.
    
    8   assertEquals: (...args) => (assert as any).equal(...args),
                       ~~~~~~~
    test.ts:1:22 - error TS6053: File '/runner/typings/mocha/index.d.ts' not found.
    
    1 /// <reference path="/runner/typings/mocha/index.d.ts" />
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    test.ts:2:22 - error TS6053: File '/runner/typings/chai/index.d.ts' not found.
    
    2 /// <reference path="/runner/typings/chai/index.d.ts" />
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        at createTSError (/workspace/default/node_modules/.pnpm/ts-node@9.1.1_typescript@4.2.2/node_modules/ts-node/src/index.ts:513:12)
        at reportTSError (/workspace/default/node_modules/.pnpm/ts-node@9.1.1_typescript@4.2.2/node_modules/ts-node/src/index.ts:517:19)
        at getOutput (/workspace/default/node_modules/.pnpm/ts-node@9.1.1_typescript@4.2.2/node_modules/ts-node/src/index.ts:752:36)
        at Object.compile (/workspace/default/node_modules/.pnpm/ts-node@9.1.1_typescript@4.2.2/node_modules/ts-node/src/index.ts:968:32)
        at Module.m._compile (/workspace/default/node_modules/.pnpm/ts-node@9.1.1_typescript@4.2.2/node_modules/ts-node/src/index.ts:1056:42)
        at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
        at Object.require.extensions.<computed> [as .ts] (/workspace/default/node_modules/.pnpm/ts-node@9.1.1_typescript@4.2.2/node_modules/ts-node/src/index.ts:1059:12)
        at Module.load (internal/modules/cjs/loader.js:928:32)
        at Function.Module._load (internal/modules/cjs/loader.js:769:14)
        at Module.require (internal/modules/cjs/loader.js:952:19)
        at require (internal/modules/cjs/helpers.js:88:18)
        at Object.exports.requireOrImport (/workspace/default/node_modules/.pnpm/mocha@8.3.0/node_modules/mocha/lib/esm-utils.js:42:12)
        at Object.exports.loadFilesAsync (/workspace/default/node_modules/.pnpm/mocha@8.3.0/node_modules/mocha/lib/esm-utils.js:55:34)
        at Mocha.loadFilesAsync (/workspace/default/node_modules/.pnpm/mocha@8.3.0/node_modules/mocha/lib/mocha.js:431:19)
        at singleRun (/workspace/default/node_modules/.pnpm/mocha@8.3.0/node_modules/mocha/lib/cli/run-helpers.js:125:15)
        at exports.runMocha (/workspace/default/node_modules/.pnpm/mocha@8.3.0/node_modules/mocha/lib/cli/run-helpers.js:190:10)
        at Object.exports.handler (/workspace/default/node_modules/.pnpm/mocha@8.3.0/node_modules/mocha/lib/cli/run.js:362:11)
        at /workspace/default/node_modules/.pnpm/yargs@16.2.0/node_modules/yargs/build/index.cjs:443:71
    
  • Custom User Avatar

    ¯_(ツ)_/¯ It was late and I couldn't think of a better solution. I'll refactor it at some point.