Skip to content

Instantly share code, notes, and snippets.

View JasonMore's full-sized avatar

Jason More JasonMore

  • Minneapolis, MN
View GitHub Profile
@JasonMore
JasonMore / server-component-render-fix.js
Last active April 25, 2025 19:57 — forked from tarunsahnan/server-component-render-fix.js
This is a fix for "Jest does not support rendering nested async components." with testing library render options. Issue https://github.com/testing-library/react-testing-library/issues/1209#issuecomment-2692563090
// Added ability to pass in options for testing-library/react
//
// Lifted from https://gist.github.com/tarunsahnan/93418e81882f2e343e09894bc6de6f35 on 2025-04-25
// Thread: https://github.com/testing-library/react-testing-library/issues/1209#issuecomment-2692563090
//
// ORIGINAL BELOW
//
// While using [this solution](https://github.com/testing-library/react-testing-library/issues/1209#issuecomment-2400054404),
// I encountered a timeout issue caused by API calls in my components. Each component was waiting for its
// API call to complete before rendering, which led to delays and affected the flow to subsequent components.
@JasonMore
JasonMore / gist:1036431
Created June 20, 2011 19:58 — forked from darrencauthon/gist:1036421
AutoMapperAssist example
Mapper.CreateMap<TestClass, TestClassViewModel>()
.ForMember(dest => dest.Bar, opt => opt.MapFrom(src => src.Foo));
var map = new Mapper<TestClass, TestClassViewModel>(Mapper.Engine);