Conversation
701b3f3 to
b278f68
Compare
|
Hmm somehow the new build structure broke this. Going to check if the panel icons are broken as well. See #944. |
components/placeholder/test/index.js
Outdated
There was a problem hiding this comment.
Can you try instead:
import Placeholder from 'components';There was a problem hiding this comment.
That is not the problem it is Dashicon. I am switching these tests over to use the proper { Placeholder } from 'components' which does work. There is a dependency on wp.element as an external in Dashicon.
There was a problem hiding this comment.
Rebased to show that { Placeholder } from 'components' works as expected.
b278f68 to
78ff2bc
Compare
|
Commit b7ce1f1 should fix the build, but really this is a bit of a mess. In test mode an import from I am reasonably satisfied with how the bundling is working in production and development mode, but the test build is a good bit more complicated. We can't use the same multiple-entry-with-multiple-names structure currently, because we require and execute a single test file I'm inclined to fix this by bringing the test build closer in line with our regular build and executing multiple files, but this can wait until a separate PR. |
Ah, I thought it had something to do with the use of wp.element as everything else seemed to work fine. Still don't understand how this fixes it but looks good to me for now. Should we merge? |
Adds basic Placeholder component tests. Related to progress on #641. Adds an extra conditional to make testing easier to prevent an element that eventually renders to null from sticking in the tree when the icon prop is not present. Testing Instructions Run npm i && npm run test-unit ensure tests pass. Change component logic to ensure tests fail as they should.
b7ce1f1 to
ef30f88
Compare
Adds basic Placeholder component tests. Related to progress on #641.
Adds an extra conditional to make testing easier to prevent an element
that eventually renders to null from sticking in the tree when the icon
prop is not present.
Testing Instructions
Run npm i && npm run test-unit ensure tests pass. Change component logic
to ensure tests fail as they should.