Skip to content

Commit b8d4b0f

Browse files
authored
Merge pull request #7 from imagekit-developer/test-case
Remove `div` in Context component
2 parents fa83817 + 60e543d commit b8d4b0f

File tree

2 files changed

+23
-33
lines changed

2 files changed

+23
-33
lines changed

src/components/IKContext/IKContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class IKContext extends ImageKitComponent {
2828
}
2929

3030
IKContext.propTypes = { ...ImageKitComponent.PropTypes, urlEndpoint: PropTypes.string, publicKey: PropTypes.string, includeOwnBody: PropTypes.bool };
31-
IKContext.defaultProps = { includeOwnBody: false };
31+
IKContext.defaultProps = { includeOwnBody: true };
3232
IKContext.contextType = ImageKitContextType;
3333

3434
export default IKContext;

src/test/__snapshots__/storyshots.test.js.snap

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Storyshots IKContext OverRidingUrlParameter 1`] = `
4-
<div>
5-
<img
6-
alt=""
7-
path="default-image.jpg"
8-
src="https://ik.imagekit.io/utkace/tr:h-300,w-400/default-image.jpg?ik-sdk-version=react-1.0.4"
9-
/>
10-
</div>
4+
<img
5+
alt=""
6+
path="default-image.jpg"
7+
src="https://ik.imagekit.io/utkace/tr:h-300,w-400/default-image.jpg?ik-sdk-version=react-1.0.4"
8+
/>
119
`;
1210

1311
exports[`Storyshots IKContext imageKitContext 1`] = `
14-
<div>
15-
<img
16-
alt=""
17-
path="default-image.jpg"
18-
src="https://ik.imagekit.io/your_imagekit_id/tr:h-300,w-400/default-image.jpg?ik-sdk-version=react-1.0.4"
19-
/>
20-
</div>
12+
<img
13+
alt=""
14+
path="default-image.jpg"
15+
src="https://ik.imagekit.io/your_imagekit_id/tr:h-300,w-400/default-image.jpg?ik-sdk-version=react-1.0.4"
16+
/>
2117
`;
2218

2319
exports[`Storyshots IKContext imagePublicKeyFail 1`] = `
@@ -27,30 +23,24 @@ exports[`Storyshots IKContext imagePublicKeyFail 1`] = `
2723
`;
2824

2925
exports[`Storyshots IKUpload imageKitUploadwithAllTheProps 1`] = `
30-
<div>
31-
<input
32-
onChange={[Function]}
33-
type="file"
34-
/>
35-
</div>
26+
<input
27+
onChange={[Function]}
28+
type="file"
29+
/>
3630
`;
3731

3832
exports[`Storyshots IKUpload imageKitUploadwithAuthentication 1`] = `
39-
<div>
40-
<input
41-
onChange={[Function]}
42-
type="file"
43-
/>
44-
</div>
33+
<input
34+
onChange={[Function]}
35+
type="file"
36+
/>
4537
`;
4638

4739
exports[`Storyshots IKUpload imageKitUploadwithoutAuthentication 1`] = `
48-
<div>
49-
<input
50-
onChange={[Function]}
51-
type="file"
52-
/>
53-
</div>
40+
<input
41+
onChange={[Function]}
42+
type="file"
43+
/>
5444
`;
5545

5646
exports[`Storyshots Image imageLinkFail 1`] = `

0 commit comments

Comments
 (0)