Skip to content

Commit

Permalink
fix: map prop to children prop for variant (#297) (#304)
Browse files Browse the repository at this point in the history
* fix: map prop to children prop for variant

Co-authored-by: Alexander Harris <alharris@amazon.com>

Co-authored-by: yeung-wah <94481720+yeung-wah@users.noreply.github.com>
  • Loading branch information
alharris-at and yeung-wah committed Dec 11, 2021
1 parent 7f08cd9 commit cc932c2
Show file tree
Hide file tree
Showing 18 changed files with 2,008 additions and 1 deletion.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ describe('amplify render tests', () => {
const generatedCode = generateWithAmplifyRenderer('complexTest8');
expect(generatedCode.componentText).toMatchSnapshot();
});
it('should render complex sample 9', () => {
const generatedCode = generateWithAmplifyRenderer('complexTest9');
expect(generatedCode.componentText).toMatchSnapshot();
});
});

describe('concat and conditional transform', () => {
Expand Down Expand Up @@ -236,6 +240,20 @@ describe('amplify render tests', () => {
});
});

describe('component with variants with mapped children prop', () => {
it('should render variants with options provided, and mapped children prop', () => {
const generatedCode = generateWithAmplifyRenderer('componentWithVariantsWithMappedChildrenProp');
expect(generatedCode).toMatchSnapshot();
});
});

describe('component with variants and not override children prop', () => {
it('should render variants with options provided, and not override children prop', () => {
const generatedCode = generateWithAmplifyRenderer('componentWithVariantsAndNotOverrideChildProp');
expect(generatedCode).toMatchSnapshot();
});
});

describe('custom render config', () => {
it('should render ES5', () => {
expect(
Expand Down

0 comments on commit cc932c2

Please sign in to comment.