Skip to content

Commit d48b32b

Browse files
committed
add test for ImageKitComponent
1 parent 7298eeb commit d48b32b

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ node_modules
33
.vscode
44
lib
55
dist
6-
coverage
6+
coverage

src/test/IKUpload.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
22
import { mount } from 'enzyme';
33
import sinon from 'sinon';
4-
import ImageKitComponent from "../../src/components/ImageKitComponent";
5-
import IKContext from '../../src/components/IKContext';
6-
import IKUpload from '../../src/components/IKUpload';
4+
import ImageKitComponent from '../components/ImageKitComponent';
5+
import IKContext from '../components/IKContext';
6+
import IKUpload from '../components/IKUpload';
77

88
const publicKey = 'test_public_key';
99
const urlEndpoint = 'http://ik.imagekit.io/test_url_endpoint';

src/test/ImageKitComponent.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
import { shallow } from 'enzyme';
3+
import ImageKitComponent from '../components/ImageKitComponent';
4+
5+
describe('ImageKitComponent', () => {
6+
describe('Snapshots', () => {
7+
test('should render null', () => {
8+
const imagekitComponent = shallow(
9+
<ImageKitComponent />
10+
);
11+
// renders: null
12+
expect(imagekitComponent.html()).toEqual(null);
13+
});
14+
});
15+
});

0 commit comments

Comments
 (0)