Skip to content

Commit

Permalink
Add test for this.Component.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Cohen committed Nov 15, 2016
1 parent c35c2f5 commit bd51a46
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions __tests__/src/elementType-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ describe('elementType tests', () => {

assert.equal(expected, actual);
});

it('should return this.Component when given its node object', () => {
const code = '<this.Component />';
const node = getOpeningElement(code);

const expected = 'this.Component';
const actual = elementType(node);

assert.equal(expected, actual);
});
});

0 comments on commit bd51a46

Please sign in to comment.