New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run jest only from the root #500
Conversation
@jxnblk I already implemented packages builder locally and gonna send a few pull requests separately starting with this one. |
Installing dependencies for each package sucks to be honest. And there are only two packages yet. |
@jxnblk Is this looking fine? |
packages/position/test/index.js
Outdated
expect(json).toHaveStyleRule('bottom', '0') | ||
expect(json).toHaveStyleRule('left', '0') | ||
}) | ||
test('Position renders', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to remove the describe
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is cleaner considering that the file is already scope. describe
helps with deeper scope like in root tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure but this change is unrelated to the PR
packages/hide/test/index.js
Outdated
import React from 'react' | ||
import TestRenderer from 'react-test-renderer' | ||
import Hide from '../src' | ||
|
||
const renderJSON = el => TestRenderer.create(el).toJSON() | ||
|
||
describe('@rebass/hide', () => { | ||
|
||
test.skip('Mapped renders', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests weren't working before – I'd like to have the tests check for rules scoped by media query – even if they're not running they're intended as placeholders to fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is used not existing component and do not different from the next one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still a placeholder that I want to keep, even if it's not up to date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.
Thanks! This looks a lot cleaner. Let me pull this down locally and give it a shot, but would like to get this in soonish |
This allows to reduce configuration and modules count per each package. All dependencies (except rebass and styled-system) are reused from the root. With yarn workspaces all depenendecies could be hoised without need to remove them from each packages. That's why I removed evenr react packages.
Rebased |
@jxnblk The next PR is ready locally. Will send after merging this. |
packages/hide/test/index.js
Outdated
expect(json).toMatchSnapshot() | ||
expect(json).toHaveStyleRule('display', 'none', { | ||
// media: 'screen and (min-width:40em)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was maybe a bug with jest-styled-components, would be good to have tests for the media query aspect of this component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug still appears. There is not media queries with any combination. Reverted comment. Not related to this PR.
@jxnblk Is this ok for you? |
Friendly ping @jxnblk |
Any news @jxnblk ? |
Ping @jxnblk |
Thanks for this! And sorry haven't done any work on Rebass lately |
This allows to reduce configuration and modules count per each package.
All dependencies (except rebass and styled-system) are reused from the
root. With yarn workspaces all depenendecies could be hoised without
need to remove them from each packages. That's why I removed evenr react
packages.