angular: Cannot use Mocha to write angular2 tests

If I use Mocha as a testing framework I’m getting the error message:

/Projects/firebase-pipes/node_modules/angular2/typings/jasmine/jasmine.d.ts(13,18): error TS2300: Duplicate identifier 'it'.
/Projects/firebase-pipes/node_modules/angular2/typings/jasmine/jasmine.d.ts(14,18): error TS2300: Duplicate identifier 'it'.
/Projects/firebase-pipes/node_modules/angular2/typings/jasmine/jasmine.d.ts(17,18): error TS2300: Duplicate identifier 'xit'.
/Projects/firebase-pipes/node_modules/angular2/typings/jasmine/jasmine.d.ts(18,18): error TS2300: Duplicate identifier 'xit'.
typings/mocha/mocha.d.ts(37,13): error TS2300: Duplicate identifier 'describe'.
typings/mocha/mocha.d.ts(38,13): error TS2300: Duplicate identifier 'xdescribe'.
typings/mocha/mocha.d.ts(43,13): error TS2300: Duplicate identifier 'it'.
typings/mocha/mocha.d.ts(44,13): error TS2300: Duplicate identifier 'xit'.

Is it necessary to propagate Angular with Jasmine typings?

https://github.com/angular/angular/blob/master/modules/angular2/manual_typings/globals-es6.d.ts#L9.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 3
  • Comments: 16 (6 by maintainers)

Most upvoted comments

This is now possible in RC4.

@juliemr Do you have any plans to enable to use Mocha or other testing frameworks with “angular2/testing” ?

I’ll be happy if that module will separate to “angular2/testing/common” and “angualr2/testing/jasmine”

+1, it would be nice to be able to choose between mocha and jasmine 😃