How to import "describe", "expect" and "it" into typescript tags for IDE so as not to highlight them

I wrote some tests and everything works successfully, but my IDE (webstorm) allocates describe, expectand itand said: "Can not find the name." I want to keep everything clean and get rid of them, but I have no idea how to do this.

We use a protractor and jasmine.

enter image description here

A few more from the script:

import {HomePO} from './pageobjects/home'
import {browser } from 'protractor'


describe('Smoke test', function() {

    it('should initialize', function() {
        let width = 320;
        let height = 568;
        browser.driver.manage().window().setSize(width, height);
    });

    it('should open homepage', function() {
        HomePO.get();
        expect(HomePO.isCurrentPage()).toBe(true);
    });
});
+4
source share
1 answer

I had the same problem:

 npm install @types/jasmine --save-dev

and it decided - no need to import anything from jasmine.

+5
source

Source: https://habr.com/ru/post/1663749/


All Articles