Skip to content

library not working without jest ? #14

Closed
@rodmax

Description

@rodmax

I attempt to write test using the angular-testing-library and get the error

ERROR in ./node_modules/@angular-extensions/testing-library/fesm5/angular-extensions-testing-library.js
    Module not found: Error: Can't resolve 'jest' in '/home/max.rodionov/work/vehicle-tax-back-office-ui/node_modules/@angular-extensions/testing-library/fesm5'
      resolve 'jest' in '/home/max.rodionov/work/vehicle-tax-back-office-ui/node_modules/@angular-extensions/testing-library/fesm5'

My environment:

  • standard angular project created by angular cli
  • so unit tests handled by karma & jasmine

i write simple test

import { MyComponent } from './my.component';
import { render } from '@angular-extensions/testing-library';

// jasmine's functions...
describe(MyComponent.name, () => {

    it('should be created', async () => {
        const driver = await render(MyComponent, {});
        expect(driver).toBeTruthy();
    });
});

thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions