Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to create "typed" version of middleware #819

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

agubler
Copy link
Member

@agubler agubler commented Jul 17, 2020

Type: bug

The following has been addressed in the PR:

Description:

When factories are used to create middleware to print typings we don't need to actually create the middleware-factory every time, only stamp the type on the returned middleware-factory type.

Resolves #817

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 17, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a859a31:

Sandbox Source
dojo/dojo-codesandbox-template Configuration

@agubler agubler added area: core Core bug Something isn't working needs back-port The fix requires back porting to one or more previous major versions labels Jul 17, 2020
@agubler agubler force-pushed the static-middleware-factories branch from 2e92475 to 2aaba40 Compare July 20, 2020 09:18
@agubler agubler requested a review from maier49 July 20, 2020 09:41
@agubler agubler changed the title WIP: Use statically defined middleware for resource and icache Add function to create "typed" version of middleware Jul 20, 2020
@agubler agubler force-pushed the static-middleware-factories branch from f3a20c7 to 0234909 Compare July 20, 2020 11:13
@agubler agubler force-pushed the static-middleware-factories branch from 0234909 to a859a31 Compare July 21, 2020 12:45
@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@9b21576). Click here to learn what that means.
The diff coverage is 98.06%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #819   +/-   ##
=========================================
  Coverage          ?   97.53%           
=========================================
  Files             ?      127           
  Lines             ?     7961           
  Branches          ?     1835           
=========================================
  Hits              ?     7765           
  Misses            ?      196           
  Partials          ?        0           
Impacted Files Coverage Δ
src/testing/harness/harness.ts 91.83% <ø> (ø)
src/testing/renderer.ts 97.64% <ø> (ø)
src/core/middleware/resources.ts 98.56% <97.32%> (ø)
src/core/middleware/icache.ts 100.00% <100.00%> (ø)
src/core/vdom.ts 97.99% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b21576...a859a31. Read the comment docs.

@agubler agubler merged commit 2218698 into dojo:master Jul 21, 2020
tomdye pushed a commit to tomdye/framework that referenced this pull request Sep 23, 2020
* Add factory function to middleware for adding types

* change to withType
@tomdye tomdye mentioned this pull request Sep 23, 2020
tomdye added a commit that referenced this pull request Sep 23, 2020
* Handle ignored children in decorate (#840)

* Allow finding and modifying wrapped widgets in functional children (#780)

* Add function to create "typed" version of middleware (#819)

* Add factory function to middleware for adding types

* change to withType

* Fix mock middleware types (#822)

* Wrap children result in an array if not already in one (#844)

* wrap children result in an array if not already in one

* add test for wrapped children

* update assert render unit test (#820)

Co-authored-by: Bradley Maier <[email protected]>
Co-authored-by: Anthony Gubler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Core bug Something isn't working needs back-port The fix requires back porting to one or more previous major versions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mocking middleware is brittle
2 participants