Skip to content

How to Dependency Inject an Object with Cypress Component Testing #23842

Closed Answered by jordanpowell88
ptletski asked this question in Component Testing
Discussion options

You must be logged in to vote

You would do it like so:

cy.mount(NotAuthorizedComponent, {
  providers:[MyService],
  imports: [MyModule],
  declarations: [MyChildComponent]
})

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@ptletski
Comment options

@ptletski
Comment options

Answer selected by jordanpowell88
Comment options

You must be logged in to vote
2 replies
@jordanpowell88
Comment options

@klofi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants