Skip to content

Instantly share code, notes, and snippets.

View kelly-tock's full-sized avatar
🎯
Focusing

Kelly Milligan kelly-tock

🎯
Focusing
View GitHub Profile
@kelly-tock
kelly-tock / separateBuilderRender.tsx
Last active February 11, 2022 19:06
example of separating a builder from renderer
import { LocalDate } from 'js-joda';
import { ViewInitializer, renderTest } from 'test/testUtils';
import { initialState } from 'state/app';
import AppConstants from 'constants/AppConstants';
import React from 'react';
import WalkinWaitlistActionCard from 'components/business/walkin-waitlist/WalkinWaitlistActionCard';
describe('<WalkinWaitlistActionCard />', () => {
const defaultBusiness = {
id: 123,
@kelly-tock
kelly-tock / testRenderer.tsx
Created February 9, 2022 17:14
example test renderer syntax
describe('<WalkinWaitlistActionCard />', () => {
const defaultBusiness = {
id: 123,
domainName: 'testWalkinWaitlist',
onlineWalkinWaitlistEnabled: true,
};
function createBaseTestRenderer() {
return testRender()
.enableFeatureFlag(['ONLINE_WALKIN_WAITLIST', 'ONLINE_WALKIN_WAITLIST_POSITION'])
.setStoreState('app', {