Skip to content

Commit 5f70ccb

Browse files
committed
Add constructor test
1 parent 1cb3e8a commit 5f70ccb

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

README.md

-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88

99
> Css selector for React Components
1010
11-
- - -
12-
13-
**Attention - This project is not completed yet.**
14-
15-
- - -
16-
1711
![Preview](preview.gif)
1812

1913
## Motivation

test/injector.js

+14
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@ describe('injector', () => {
174174
baz: React.PropTypes.string,
175175
}
176176

177+
constructor(props, context) {
178+
super(props, context);
179+
expect(props).toEqual({
180+
className: 'bar',
181+
style: 'foo',
182+
});
183+
expect(context).toEqual({
184+
baz: 'lorem ipsum dolor',
185+
});
186+
expect(this.state).toEqual({
187+
foo: 'test',
188+
});
189+
}
190+
177191
state = {
178192
foo: 'test',
179193
}

0 commit comments

Comments
 (0)