Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failures in nest #156

Open
apotterri opened this issue Jul 29, 2024 · 0 comments
Open

test failures in nest #156

apotterri opened this issue Jul 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@apotterri
Copy link

Running npm test in nestjs/nest, some tests fail:

  1) ConfigurableModuleBuilder
       setExtras
         should apply module definition transformer function and return typed builder:
     Error: "ASYNC_OPTIONS_TYPE" is not supposed to be used as a value.
      at Object.get (packages/common/module-utils/configurable-module.builder.ts:417:17)
      at isSimpleObject (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:99:57)
      at parameterSchema (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:93:12)
      at parameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:9:42)
      at optParameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:65:10)
      at makeReturnEvent (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/event.ts:38:31)
      at Recording.functionReturn (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/Recording.ts:55:34)
      at /Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:85:17
      at Array.map (<anonymous>)
      at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:84:37)
      at ConfigurableModuleBuilder.createTypeProxy (packages/common/module-utils/configurable-module.builder.ts:414:36)
      at ConfigurableModuleBuilder.<anonymous> (packages/common/module-utils/configurable-module.builder.ts:312:34)
      at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
      at ConfigurableModuleBuilder.build (packages/common/module-utils/configurable-module.builder.ts:304:36)
      at Context.<anonymous> (packages/common/test/module-utils/configurable-module.builder.spec.ts:15:11)
      at processImmediate (node:internal/timers:483:21)

  2) ConfigurableModuleBuilder
       setClassMethodName
         should set static class method name and return typed builder:
     Error: "ASYNC_OPTIONS_TYPE" is not supposed to be used as a value.
      at Object.get (packages/common/module-utils/configurable-module.builder.ts:417:17)
      at isSimpleObject (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:99:57)
      at parameterSchema (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:93:12)
      at parameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:9:42)
      at optParameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:65:10)
      at makeReturnEvent (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/event.ts:38:31)
      at Recording.functionReturn (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/Recording.ts:55:34)
      at /Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:85:17
      at Array.map (<anonymous>)
      at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:84:37)
      at ConfigurableModuleBuilder.createTypeProxy (packages/common/module-utils/configurable-module.builder.ts:414:36)
      at ConfigurableModuleBuilder.<anonymous> (packages/common/module-utils/configurable-module.builder.ts:312:34)
      at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
      at ConfigurableModuleBuilder.build (packages/common/module-utils/configurable-module.builder.ts:304:36)
      at Context.<anonymous> (packages/common/test/module-utils/configurable-module.builder.spec.ts:32:18)
      at processImmediate (node:internal/timers:483:21)
  1. ConfigurableModuleBuilder
    setFactoryMethodName
    should set configuration factory class method name and return typed builder:
    Error: "ASYNC_OPTIONS_TYPE" is not supposed to be used as a value.
    at Object.get (packages/common/module-utils/configurable-module.builder.ts:417:17)
    at isSimpleObject (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:99:57)
    at parameterSchema (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:93:12)
    at parameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:9:42)
    at optParameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:65:10)
    at makeReturnEvent (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/event.ts:38:31)
    at Recording.functionReturn (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/Recording.ts:55:34)
    at /Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:85:17
    at Array.map ()
    at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:84:37)
    at ConfigurableModuleBuilder.createTypeProxy (packages/common/module-utils/configurable-module.builder.ts:414:36)
    at ConfigurableModuleBuilder. (packages/common/module-utils/configurable-module.builder.ts:312:34)
    at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
    at ConfigurableModuleBuilder.build (packages/common/module-utils/configurable-module.builder.ts:304:36)
    at Context. (packages/common/test/module-utils/configurable-module.builder.spec.ts:41:74)
    at processImmediate (node:internal/timers:483:21)

  2. ConfigurableModuleBuilder
    build
    should return a fully typed "ConfigurableModuleClass":
    Error: "ASYNC_OPTIONS_TYPE" is not supposed to be used as a value.
    at Object.get (packages/common/module-utils/configurable-module.builder.ts:417:17)
    at isSimpleObject (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:99:57)
    at parameterSchema (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:93:12)
    at parameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:9:42)
    at optParameter (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/parameter.ts:65:10)
    at makeReturnEvent (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/event.ts:38:31)
    at Recording.functionReturn (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/Recording.ts:55:34)
    at /Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:85:17
    at Array.map ()
    at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:84:37)
    at ConfigurableModuleBuilder.createTypeProxy (packages/common/module-utils/configurable-module.builder.ts:414:36)
    at ConfigurableModuleBuilder. (packages/common/module-utils/configurable-module.builder.ts:312:34)
    at ConfigurableModuleBuilder.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
    at ConfigurableModuleBuilder.build (packages/common/module-utils/configurable-module.builder.ts:304:36)
    at Context. (packages/common/test/module-utils/configurable-module.builder.spec.ts:53:11)
    at processImmediate (node:internal/timers:483:21)

  3. NestContainer
    addModule
    should add global module when module is global:
    TypeError: Cannot read properties of undefined (reading 'call')
    at Module.set isGlobal [as isGlobal] (packages/core/injector/module.ts:1067:36)
    at NestContainer. (packages/core/injector/container.ts:758:28)
    at async NestContainer. (packages/core/injector/container.ts:723:20)
    at async Context. (packages/core/test/injector/container.spec.ts:63:7)

  4. NestContainer
    replaceModule
    should add global module when module is global:
    TypeError: Cannot read properties of undefined (reading 'call')
    at Module.set isGlobal [as isGlobal] (packages/core/injector/module.ts:1067:36)
    at NestContainer. (packages/core/injector/container.ts:758:28)
    at async NestContainer. (packages/core/injector/container.ts:723:20)
    at async Context. (packages/core/test/injector/container.spec.ts:83:7)

  5. InstanceLoader
    should call "loadPrototype" for every provider and controller in every module:
    ExpectationError: Unexpected call: getModules()
    Expectation met: getModules('[...]') once
    at Object.fail (node_modules/sinon/lib/sinon/mock-expectation.js:314:27)
    at Object.invokeMethod (node_modules/sinon/lib/sinon/mock.js:210:25)
    at NestContainer. (node_modules/sinon/lib/sinon/mock.js:72:35)
    at InstanceLoader. (packages/core/injector/instance-loader.ts:488:79)
    at InstanceLoader.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
    at InstanceLoader.createInstancesOfDependencies (packages/core/injector/instance-loader.ts:488:36)
    at Context. (packages/core/test/injector/instance-loader.spec.ts:68:11)
    at processImmediate (node:internal/timers:483:21)

  6. InstanceLoader
    for every provider in every module
    "before each" hook for "should call "loadProvider"":
    ExpectationError: Unexpected call: getModules()
    Expectation met: getModules('[...]') once
    at Object.fail (node_modules/sinon/lib/sinon/mock-expectation.js:314:27)
    at Object.invokeMethod (node_modules/sinon/lib/sinon/mock.js:210:25)
    at NestContainer. (node_modules/sinon/lib/sinon/mock.js:72:35)
    at InstanceLoader. (packages/core/injector/instance-loader.ts:488:79)
    at InstanceLoader.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
    at InstanceLoader.createInstancesOfDependencies (packages/core/injector/instance-loader.ts:488:36)
    at Context. (packages/core/test/injector/instance-loader.spec.ts:98:7)
    at processImmediate (node:internal/timers:483:21)

  7. InstanceLoader
    for every controller in every module
    "before each" hook for "should call "loadController"":
    ExpectationError: Unexpected call: getModules()
    Expectation met: getModules('[...]') once
    at Object.fail (node_modules/sinon/lib/sinon/mock-expectation.js:314:27)
    at Object.invokeMethod (node_modules/sinon/lib/sinon/mock.js:210:25)
    at NestContainer. (node_modules/sinon/lib/sinon/mock.js:72:35)
    at InstanceLoader. (packages/core/injector/instance-loader.ts:488:79)
    at InstanceLoader.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
    at InstanceLoader.createInstancesOfDependencies (packages/core/injector/instance-loader.ts:488:36)
    at Context. (packages/core/test/injector/instance-loader.spec.ts:135:7)
    at processImmediate (node:internal/timers:483:21)

  8. InstanceLoader
    for every injectable in every module
    "before each" hook for "should call "loadInjectable"":
    ExpectationError: Unexpected call: getModules()
    Expectation met: getModules('[...]') once
    at Object.fail (node_modules/sinon/lib/sinon/mock-expectation.js:314:27)
    at Object.invokeMethod (node_modules/sinon/lib/sinon/mock.js:210:25)
    at NestContainer. (node_modules/sinon/lib/sinon/mock.js:72:35)
    at InstanceLoader. (packages/core/injector/instance-loader.ts:488:79)
    at InstanceLoader.record (/Users/ajp/.npm/_npx/c76987c9a3c183fa/node_modules/appmap-node/src/recorder.ts:81:24)
    at InstanceLoader.createInstancesOfDependencies (packages/core/injector/instance-loader.ts:488:36)
    at Context. (packages/core/test/injector/instance-loader.spec.ts:170:7)
    at processImmediate (node:internal/timers:483:21)

  9. RouterExecutionContext
    create
    when callback metadata is not undefined
    returns proxy function
    when proxy function called
    should apply expected context and arguments to callback:
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/ajp/src/nestjs/nest/packages/core/test/router/router-execution-context.spec.ts)
    at listOnTimeout (node:internal/timers:581:17)
    at processTimers (node:internal/timers:519:7)

@apotterri apotterri added the bug Something isn't working label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant