0

I'm using Jasmine to run my unit tests. I'm trying to import a class that extends from another class to be able to test it. Example:

export class MyComponent extends Polymer.Element {
(...)
}

The problem:

When I import it in my file.test.ts

import { MyComponent} from "<path to component>";
(...)

I got the following error stack tracer conosle error: ReferenceError: Polymer is not defined

I've been trying find out a way to Mock the Polymer class just to be able to import the MyComponent class and test the functions inside it.

Question:

How can I Mock (in Jasmine) the Polymer class to be able to import my component in my test file?

I appreciate any support

0 Answers0