Skip to content

angular test fails #712

@IPdotSetAF

Description

@IPdotSetAF

Describe the bug
test fails on simplebar OnDestroy()
error message:

ERROR: 'Error during cleanup of component', Object{component: AppComponent{header: true, footer: true, headerTransparent: false, headerPosition: 2, __ngContext__: 0}, stacktrace: TypeError: Cannot read properties of undefined (reading 'unMount')
TypeError: Cannot read properties of undefined (reading 'unMount')
    at SimplebarAngularComponent.call [as ngOnDestroy] (http://localhost:9876/_karma_webpack_/webpack:/node_modules/simplebar-angular/fesm2022/simplebar-angular.mjs:22:24)   
    at executeOnDestroys (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/core.mjs:11349:32)
    at cleanUpView (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/core.mjs:11252:9)
    at destroyViewTree (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/core.mjs:11076:21)
    at destroyLView (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/core.mjs:11225:9)
    at ViewRef$1.destroy (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/core.mjs:14120:9)
    at ComponentRef.destroy (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/core.mjs:16844:23)
    at PseudoApplicationComponentFixture.destroy (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/testing.mjs:287:31)
    at PseudoApplicationComponentFixture.destroy (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/testing.mjs:418:15)
    at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2022/testing.mjs:2105:25}

To Reproduce
Steps to reproduce the behavior:

  1. Create a new angular 18 project
  2. add simple bar component in the appCompomnent
  3. test fails!

Your environment

Software Version(s)
SimpleBar-angular 3.2.6
Browser Chrome
npm 10.5.2
Operating System Win64
Angular 18.2.3
Node 20.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions