Skip to content

Commit 3fc714f

Browse files
authored
Merge pull request #27 from udaypydi/fix/lazy-load-components
loader component snapshot added
2 parents d8ab8f6 + da89218 commit 3fc714f

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module.exports = {
77
coverageDirectory: "coverage",
88
moduleNameMapper: {
99
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/config/assetsMock.js",
10-
"\\.(css|less|scss)$": "identity-obj-proxy"
10+
"\\.(css|less|scss)$": "identity-obj-proxy",
11+
"^uielements(.*)$": "<rootDir>/src/uielements$1"
1112
},
1213
testEnvironment: "jsdom",
1314
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`should take a snapshot 1`] = `
4+
<DocumentFragment>
5+
<div
6+
class="Loader--Container"
7+
>
8+
<div
9+
class="Loader--Element"
10+
/>
11+
</div>
12+
</DocumentFragment>
13+
`;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import { render } from 'test-utils';
3+
import Loader from 'uielements/loader/loader.component.jsx';
4+
5+
it('should take a snapshot', () => {
6+
const { asFragment } = render(<Loader />)
7+
8+
expect(asFragment(<Loader />)).toMatchSnapshot()
9+
});

0 commit comments

Comments
 (0)