bahmutov / bahmutov/cypress-angular-unit-test

Can not mount any component on my project

Open
#504 1 comment 0 reactions 1 assignee Claimed by @LeJeanbono View on GitHub
Dominant language
TypeScript
Stars
160
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### Current behavior
I just installed the library and started doing an examples for my project components, Im facing the same error with all components.
Basically until now i need only to mount any component to the cypress browser
In this code Im using the same example from the readme file of the library. Also i tried to mount HTML directly but got the same result.

### Test code to reproduce

`describe('AppComponent', () => {
it('shows the input', () => {

//initEnv(MyComponent);
// You can also :
initEnv({declarations: [MyComponent]});
// initEnv({imports: [MyModule]});

// getCypressTestBed().configureTestingModule({
// declarations: [MyComponent]
// })
getCypressTestBed().createComponent(MyComponent)
// component + any inputs object
mount(MyComponent);
// use any Cypress command afterwards
cy.contains('Welcome to World!');
});
});`
### Erros
Screen Shot 2021-06-28 at 9 14 51

### Versions
Angular 10.2.4
Cypress 7.6.0

Any ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.