Skip to content

Commit

Permalink
fix(transformData): this test is not needed, already covered by Template
Browse files Browse the repository at this point in the history
  • Loading branch information
redox committed Oct 12, 2015
1 parent 94c53d3 commit 36e5b9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion components/__tests__/Template-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('Template', () => {
expect(out).toEqual(<div dangerouslySetInnerHTML={{__html: 'it supports transformData'}}></div>);
});

it('throws an error if the transformData is not anything', () => {
it('throws an error if the transformData is not returning anything', () => {
templates = {test: 'it supports {{feature}}'};
data = {feature: 'replace me'};
templateKey = 'test';
Expand Down
4 changes: 0 additions & 4 deletions widgets/toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ function prepareToggleData(transformData) {

if (transformData) {
newData = transformData(newData);
if (typeof newData !== 'object') {
throw new Error('`transformData` must return an object.');
}
}

return newData;
};
}
Expand Down

0 comments on commit 36e5b9c

Please sign in to comment.