brxnzaz
brxnzaz

Reputation: 491

Cannot find module '@angular/cdk/testing'

i'm trying to work with the createKeyboardEvent in @angular/cdk/testing in order to be able to use the key board events:

const ENTER_EVENT = createKeyboardEvent('keydown', ENTER, inputNativeElement);

I couldn’t find the module at all even though i install @angular/cdk with :

  `npm i @angular/cdk`

Upvotes: 4

Views: 1658

Answers (2)

Oded BD
Oded BD

Reputation: 3286

This was an internal module as you can see in this Github issue, but now with the new component harnesses at angular 9 they opened it up to everyone use.

You can install it with

npm install @angular/cdk --save 

and import it with

import {ComponentHarness} from '@angular/cdk/testing';

Upvotes: 2

itsjustamirage
itsjustamirage

Reputation: 17

There is no module @angular/cdk/testing, it has been removed and issue stil holds on github.

Upvotes: -1

Related Questions