Reputation: 152
I'm trying to run angular application. I have wiped node_module
, reinstall it, install latest typescript version but still I have this error: Cannot find name 'describe'
, Cannot find name 'beforeEach'
and others are same.
Here is code:
import * as React from 'react';
import { mount } from 'enzyme';
import { iocContainer } from '../../utils/ioc';
import { Product } from '../../models/Product';
import { ProductCreationForm } from './ProductCreationForm';
import { ProductStore } from '../../stores/ProductStore';
import * as fileUpload from '../../helpers/fileUpload';
import { FileDialog } from '../ui';
describe('Product creation form', function () {
let store: ProductStore;
beforeEach(() => store = iocContainer.get(ProductStore));
...
Maybe problem in package.json or webpack?
Upvotes: 2
Views: 10804
Reputation:
More like an issue with your typescript definintions and jasmine !
In the @types/jasmine
package, you have an index.d.ts
file containing some lines like this
declare function describe(description: string, specDefinitions: () => void): void;
Could you check if you have them ? Could you also check your package.json
to see if you all have the dependencies ?
Also, how did you create your project ? was it with the CLI ?
Upvotes: 4