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

bug(components with test harness example): Missing dependencies in StackBlitz examples #997

Closed
amysorto opened this issue May 26, 2021 · 2 comments · Fixed by #1009
Closed

Comments

@amysorto
Copy link
Contributor

Reproduction

This applies for the example that use test harness for all material components (except for ripples).

Steps to reproduce:

  1. Open the StackBlitz link for examples that have tests using a test harness in the 'Examples' page.

Expected Behavior

A working StackBlitz link for these examples. The examples in the documentation site for v11 work as expected (working example for tree component).

Actual Behavior

The StackBlitz link for v12 documentation for test harnesses show an error (failing example for tree component).

The error is the same for all:

Could not find a declaration file for module 'jasmine-core/lib/jasmine-core/jasmine.js'. '/turbo_modules/[email protected]/lib/jasmine-core/jasmine.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/jasmine-core` if it exists or add a new declaration (.d.ts) file containing `declare module 'jasmine-core/lib/jasmine-core/jasmine.js';`

Environment

  • Angular: ^12.0.0
  • CDK/Material: ^12.0.0
  • Browser(s): Chrome 90
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS
@Splaktar Splaktar transferred this issue from angular/components May 26, 2021
@Splaktar
Copy link
Member

It looks like we need to add @types/jasmine-core to the following

'@types/jasmine': '^3.6.6',
'jasmine-core': '^3.6.0',


I think that we need to add jasmine-core to this package.json as well.

@amysorto amysorto self-assigned this May 26, 2021
amysorto added a commit to amysorto/material.angular.io that referenced this issue May 26, 2021
Splaktar added a commit to DevIntent/material.angular.io that referenced this issue Jun 7, 2021
- remove tslint and codelyzer from examples
- update jasmine dependencies
- remove unused material-module.ts from test assets
- add jasmine-core to package.json in stack-blitz-tests/
- disable `noImplicitAny` in stack-blitz-tests' tsconfig.spec.json since
  `jasmine-core/lib/jasmine-core/jasmine.js` imported in `test/jasemine-setup.ts`
   is not compatible

Fixes angular#997
@Splaktar Splaktar added the has pr label Jun 7, 2021
@Splaktar Splaktar self-assigned this Jun 7, 2021
@Splaktar
Copy link
Member

Splaktar commented Jun 7, 2021

It wasn't that easy at all. But I have a fix in PR #1009.

Splaktar added a commit to DevIntent/material.angular.io that referenced this issue Jul 19, 2021
- remove tslint and codelyzer from examples
- update jasmine dependencies
- remove unused material-module.ts from test assets
- add jasmine-core to package.json in stack-blitz-tests/
- disable `noImplicitAny` in stack-blitz-tests' tsconfig.spec.json since
  `jasmine-core/lib/jasmine-core/jasmine.js` imported in `test/jasemine-setup.ts`
   is not compatible

Fixes angular#997
crisbeto pushed a commit that referenced this issue Jul 29, 2021
…les (#1009)

- remove tslint and codelyzer from examples
- update jasmine dependencies
- remove unused material-module.ts from test assets
- add jasmine-core to package.json in stack-blitz-tests/
- disable `noImplicitAny` in stack-blitz-tests' tsconfig.spec.json since
  `jasmine-core/lib/jasmine-core/jasmine.js` imported in `test/jasemine-setup.ts`
   is not compatible

Fixes #997
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants