P
P
Paxest2019-11-06 23:34:10
npm
Paxest, 2019-11-06 23:34:10

How to disable type checking of a node module if there is no @types for it?

Good afternoon!
I set up testing using Mocha, Mocha-jsdom, TS. I collect in webpack.
I'm trying to at least run the file.
test file looks like this

import { assert } from 'chai';
import * as mocha from 'mocha';

import * as jsdom from 'mocha-jsdom';

describe('Тестирование View',
() => {
describe('Пробное тестирование',
() => {

jsdom();

it('Выполнить тест', () => {
assert.equal(5, 5);
});
})
})

The error appears on the line import * as jsdom from 'mocha-jsdom';
Try `npm install @types/mocha-jsdom` if it exists or add a new declaration (.d.ts) file containing `declare module 'mocha-jsdom';`
Sorry if this is a dumb question, but how do I disable type checking for mocha jsdom?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Paxest, 2019-11-07
@Paxest

You can close it, I did not find a solution, but I did it through JSDOM and its @types

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question