Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Investigate warning and error messages in unit testing #40

Open
joanise opened this issue Jan 25, 2023 · 0 comments
Open

Investigate warning and error messages in unit testing #40

joanise opened this issue Jan 25, 2023 · 0 comments

Comments

@joanise
Copy link
Member

joanise commented Jan 25, 2023

When I run npm run test:once or when unit testing runs in CI (see https://github.com/ReadAlongs/Studio-Web/actions/workflows/tests.yml) there are a lot of messages that start with WARN and a lot that start with ERROR.

While the unit tests pass anyway, and the app runs anyway, these messages could be symptoms of latent problems, and we should investigate them at some point.

E.g.:

WARN: '
  It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true
  when you set up this control in your component class, the disabled attribute will actually be set in the DOM for
  you. We recommend using this approach to avoid 'changed after checked' errors.

  Example:
  // Specify the `disabled` property at control creation time:
  form = new FormGroup({
    first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),
    last: new FormControl('Drew', Validators.required)
  });

  // Controls can also be enabled/disabled after creation:
  form.get('first')?.enable();
  form.get('last')?.disable();
'

and

ERROR: 'NG0303: Can't bind to 'ngModel' since it isn't a known property of 'input' (used in the 'DemoComponent' component template).
1. If 'input' is an Angular component and it has the 'ngModel' input, then verify that it is a part of an @NgModule where this component is declared.
2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant