Flow-typed: Jest and Jasmine type definition collision

Created on 24 Aug 2016  路  4Comments  路  Source: flow-typed/flow-typed

Both Jest v14 and Jasmine v2.4 definitions declare the jasmine variable, causing on type definition to override the other. This prevents the use of jasmine.any when using Jest.

Should Jest come with the Jasmine definition included? This would seem to make sense considering that Jest exposes the jasmine global.

question

All 4 comments

Hmm, good point.

@cpojer - was the intent to add a field to the global jasmine var? I'm afraid there isn't currently a good way to do that. How important is the DEFAULT_TIMEOUT_INTERVAL field? Could we delete the definition? Or could we add it to the jasmine definition?

@jeffmo - I'm adding this to the launch milestone, because it's probably important to have a good story around how these cross-package interactions should be resolved.

Oh, https://github.com/flowtype/flow-typed/pull/265 tries to resolve this too!

Jest should come with jasmine definitions as we are slowly planning on replacing Jasmine with a compatible runner. Please add all missing definitions from Jasmine to the Jest one :)

This seems to be solved by #265 so I'm going to close it. Thanks @elliottsj!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Inzephirum picture Inzephirum  路  3Comments

sam-n-johnston picture sam-n-johnston  路  3Comments

ggravarr picture ggravarr  路  3Comments

pmrcunha picture pmrcunha  路  3Comments

Haroenv picture Haroenv  路  3Comments