Commit Graph

37 Commits

Author SHA1 Message Date
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Forbes Lindesay
8f8f6c4392 [react] Use HTMLDialogElement for the dialog node (#23053)
* [react] Use HTMLDialogElement for the dialog node

* Actually add the `open` property

* This update requires typescript 2.6

* Update dependents of react to also require typescript 2.6
2018-02-12 12:55:52 +00:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
UselessPickles
2e2da6027f [enzyme] Fix signature of the "filter" method. (#23108)
* Improve signature of ShallowWrapper.filter and ReactWrapper.filter to
return appropriate specific types when the apram is a ComponentClass or
StatelessComponent.

* Improve signature of filter() to return a wrapper with HTMLAttributes props when a string CSS selector is provided.

* Improve unit tests to properly test various signatures of methods that are expected to return wrappers with different props types.

* [enzyme] Fix signature of "filter" when param type does not narrow down the possible type of the element/component collection.

* [enzyme] Fix incorrect use of "this" return type in "filter" signatures.
2018-01-23 10:18:02 -08:00
UselessPickles
944b7ba283 enzyme: Improve signature of ShallowWrapper.filter and ReactWrapper.filter (#22975)
* Improve signature of ShallowWrapper.filter and ReactWrapper.filter to
return appropriate specific types when the apram is a ComponentClass or
StatelessComponent.

* Improve signature of filter() to return a wrapper with HTMLAttributes props when a string CSS selector is provided.

* Improve unit tests to properly test various signatures of methods that are expected to return wrappers with different props types.
2018-01-19 10:15:01 -08:00
Andy
d0a3ad7578
enzyme: Fix --strictFunctionTypes error (#22201) 2017-12-14 15:32:20 -08:00
Pavel Birukov
b2692d72c1 Add disableLifecycleMethods option to configure() and shallow() 2017-11-15 00:02:49 +02:00
Daniel Rosenwasser
02890b4dca
Merge pull request #21046 from jimthedev/fix_enzyme_containsMatchingElement_react16
fix: enzyme -> allow contains fns to accept arrays (react 16)
2017-11-10 20:36:50 -08:00
Andy
b67c928904
enzyme: Fix lint (#21172) 2017-11-01 10:28:58 -07:00
Andy
a11a781688
Fix some no-empty-interface lint errors (#21144) 2017-10-31 10:52:41 -07:00
Jim Cummins
8cf04ecafa fix: enzyme -> allow contains fns to accept arrays (react 16) 2017-10-26 15:02:41 -05:00
Andy
2ab92f4635 enzyme: Fix lint (#20855) 2017-10-23 07:43:09 -07:00
Andrew Fong
1b06f10a97 Update Enzyme version number
Previous updates to this type definition were for changes introduced in Enzyme 3.0 and 3.1, not 2.8.
2017-10-13 16:30:32 -07:00
Tanguy Krotoff
f02ac07f96 Add enzyme-adapter-react-* (#20415)
* Add enzyme-adapter-react-15 and enzyme-adapter-react-16

* Fix dtslint "Error: Unexpected compiler option ..."

* Introduce EnzymeAdapter
2017-10-09 18:12:44 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Eric Lam
c7380aece7 Update @type/enzyme to include hostNodes() (#20291) 2017-10-04 11:02:39 -07:00
Émile Filteau-Tessier
44443f8e49 Added getElement and getElements to enzyme types (#20116) 2017-10-02 10:37:47 -07:00
Martin Chaov
036c225f85 Updated Enzyme typings (#20073) 2017-09-27 13:42:11 -07:00
Rudi Chen
d75afe93fb Fix typo (any -> all) for everyWhere description 2017-09-11 11:39:04 -07:00
matias.ponce
21b49700d3 CommonWrapper accepts ReactElements and strings in contains method 2017-09-05 09:44:30 -03:00
Andy
d74806eb3d Add lint disables for no-unnecessary-generics (#19508) 2017-09-01 08:34:37 -07:00
Andy
924fafffc0 Fix remaining lint errors (#19166) 2017-08-20 15:37:53 -07:00
jwbay
e3c344e6a4 make ReactWrapper and ShallowWrapper classes (#18891) 2017-08-14 11:23:23 -07:00
Torgeir Hovden
245998780e Add missing option callback arg to setProps (#18215)
* Add missing option callback arg to setProps

* Allow callback only on ReactWrapper, ref. @MartynasZilinskas comment
2017-08-09 07:02:00 -07:00
Tom Doggett
3f1a9ccec0 Updating React.HTMLAttributes used by Enzyme to new React.AllHTMLAttributes interface introduced in @types/react-15.0.38 (#18269) 2017-07-21 09:47:36 -07:00
Tom Crockett
90189c120b Remove myself from credits (#18234)
I don't currently use enzyme and don't want to be responsible reviewing PRs for this repo
2017-07-20 01:22:12 -07:00
atothek1
da620a35a3 Update index.d.ts
Fixing compile errors that needs a a value for the generic State property in React.Component<Props, State>
2017-06-30 08:45:06 +02:00
Tanguy Krotoff
ea9de8a518 Replace React.Component<(.*), (any|void|\{\}|null)> by React.Component<$1>
+ many manual adjustments
2017-06-19 13:35:50 +02:00
Tanguy Krotoff
eeb262e1d8 Update react to TypeScript 2.3 2017-06-19 13:34:54 +02:00
Nathan Shively-Sanders
163f4438df Fix weak type errors (#16845)
* Fix first round of weak type errors

Done through griddle-react

* 95% done with weak type fixes

* Fix last couple of weak type errors

* Remove some lint from mithril tests

* mithril's Lifecycle is not a weak type any more

Restore the Lifecycle constraints in the rest of the definitions.

* Fix react-redux tests after #16652 broke them

* Remove package-lock.json
2017-06-04 22:03:03 -07:00
Martynas Žilinskas
b746bd969d [enzyme] Added missing methods and deprecation warning on method. (#16275)
* Added getNode and getNodes in CommonWrapper w/ tests.

* Added getDOMNode in CommonWrapper w/ tests.

* Added slice in CommonWrapper w/ tests.

* Added tap in CommonWrapper w/ tests.

* Deprecation on isEmpty method.

* Updated dts header.
2017-05-03 07:31:29 -07:00
Andy
fa2480ba61 Remove more namespaces from tests (#16029) 2017-04-20 09:06:00 -07:00
Andy
e50f8878a5 Use new strict-export-declare-modifiers lint rule (#15844) 2017-04-14 08:20:12 -07:00
Andy
bbc61fbf93 Extend "dtslint/dt.json" directly instead of "../tslint.json". (#15822)
* Extend "dtslint/dt.json" directly instead of "../tslint.json".

* Convert more "../tslint.json" to "dtslint/dt.json"

* no-redundant-modifiers -> strict-export-declare-modifiers
2017-04-14 08:04:05 -07:00
huhuanming
c0c58b9f36 Add ShallowRendererProps Into ShallowWrapper's shallow Fn 2017-04-07 14:20:07 +08:00
Andy
64bf3f8456 Apply new lint rules to some more packages (#15546) 2017-03-31 08:14:27 -07:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00