wardbell / bardjs

Spec helpers for testing angular v.1.x apps with Mocha, Jasmine and QUnit
MIT License
178 stars 34 forks source link

Compile errors with Bard + Typescript + Jasmine #40

Open jsmarsch opened 8 years ago

jsmarsch commented 8 years ago

I'll warn you first that I'm a little new to typescript, so I might just have something wrong.

I'm using Definitely Typed typings with Bardjs, and I'm using Jasmine as my unit test framework. When I tried to compile my typescript, I was getting errors because Bardjs.d.ts references Mocha and Chai typings.

So, I tried just pulling the mocha and chai typings into the project, but once I did that, the definitions of it, expect, etc all clashed with jasmine so I got multiple errors about expect being defined twice.

Is this something I've done wrong (seems weird that all of those types are globally scoped), or is this a bug?

bronielsen commented 7 years ago

I got the same problem jsut now. I am using Jasmine along with Typescript.

When I Typescript compile my tests, bard/index.d.ts references mocha/index.d.ts, and somehow jasmine/index.d.ts is also brought in. mocha.d.ts and jasmine.d.ts conflict with each other and causes this error ...\node_modules\@types\jasmine\index.d.ts(9,18): error TS2300: Build:Duplicate identifier 'describe'.

jmichaud-ips commented 7 years ago

I'm also struggling with the same problem. As soon as I add bardjs, the compiler brings in the other types it imports. If I don't bring in bardjs, then I get compile errors in my Jasmine spec files that it can't find bard.

alaney commented 7 years ago

I'm seeing the same thing. Any updates on possible solutions?