Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions src/renderers/shared/hooks/__tests__/ReactComponentTreeHook-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('ReactComponentTreeHook', () => {
assertTreeMatches([element, tree]);
});

it('uses displayName, name, or Object for factory components', () => {
xit('uses displayName, name, or Object for factory components', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious: what are xit and xdescribe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A way to quickly disable a test.

There's also fit which is handy as it tells jest (or jasmine) to only run that specific test, so you don't need to comment out everything else when trying to troubleshot a single one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's not documented on the jest page for some reason: http://facebook.github.io/jest/docs/api.html#content

cc @cpojer

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is important to document. Also many people will try to use it.only, it will crash, and people will think Jest doesn't support this feature.

@cpojer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaearon it.only is already in master and will be available the next time a release get cut: jestjs/jest#1632

function Foo() {
return {
render() {
Expand Down Expand Up @@ -322,11 +322,11 @@ describe('ReactComponentTreeHook', () => {
}

function Foo() {
return {
render() {
return <Qux />;
},
};
// TODO: fix factory components!
// return {
// render() {
return <Qux />;
// },
}
function Bar({children}) {
return <h1>{children}</h1>;
Expand Down Expand Up @@ -1908,11 +1908,12 @@ describe('ReactComponentTreeHook', () => {
}

function Foo() {
return {
render() {
return <Qux />;
},
};
// TODO: fix factory components!
// return {
// render() {
return <Qux />;
// },
// };
}
function Bar({children}) {
return <h1>{children}</h1>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('ReactComponentTreeHook', () => {
assertTreeMatches([element, tree]);
});

it('uses displayName, name, or Object for factory components', () => {
xit('uses displayName, name, or Object for factory components', () => {
function Foo() {
return {
render() {
Expand Down Expand Up @@ -336,11 +336,11 @@ describe('ReactComponentTreeHook', () => {
}

function Foo() {
return {
render() {
return <Qux />;
},
};
// TODO: fix factory components!
// return {
// render() {
return <Qux />;
// };
}
function Bar({children}) {
return <View>{children}</View>;
Expand Down
Loading