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

Investigate warning and error messages in unit testing #40

@joanise

Description

@joanise

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.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions