Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@boulevard/react-components
Advanced tools
A component library written in React.
First follow the instructions for contributing here.
Storybook is a tool for building UI component libraries in isolation. Once you've bootstraped the monorepo you will be able to launch Storybook by running the following command:
This command should be ran from the package root. You can also run this command from the repo root using lerna.
$ npm run storybook
Storybook should be used to explicilty show each state your component can be in. This provides three affordances:
Manual Visual Testing
A person can manually confirm that each state of your component looks right. In the future we can generate snap shots from our stories so that manual confirmation is only necessary if something changes.
You shouldn't worry about making your component interactive. Component interactions will be tested with automated tests. Again we are only concerned with what our component looks like in differnet states.
Transparency With Design
Our design team can visually inspect a component and use that in designs or prototypes.
Shared Development Environment
An engineer can easily pickup where another engineer left off without having to create a fresh development environment for interacting with components.
Note: This isn't your own personal playground for components. If you need a sandboxed environment for working on components you can name your private stories with the .private.stories file extension. For example, a file of the name foo.private.stories.tsx will not be checked into source control.
Tests are written using Jest and Enzyme. The CI pipeline is configure to fail unless a certain threshold of coverage is met. You can run the test with the following command:
This command should be ran from the package root. You can also run the tests from the repo root using lerna.
$ npm run test
Our testing strategies will evolve overtime as we evolve as engineers but I have identified two main testing criterial for interface components that I believe are a good start.
Testing Component Interections
Interaction testing involves testing uers actions as they would be performed by a user on a specific platform. You could think of these as a type of integration test becuase they are dependent on the platform. For example, testing that clicking a button triggers some output. These types of tests SHOULD utilize Platform APIs and assert that the component responds properly to the user action.
Note that a full platform enviroment is not strictly necessary. For example, jsdom is sufficent for most interactions in a browser enviroment.
Testing Component APIs
If your component exposes a public API then these methods should be tested. For pure functions writting these tests are ussally striaght forward becuase your output is always the same given the same input (think functional programming). That is why I would recommend awlays making your functions pure if possible.
The following tools are used by this package:
FAQs
React components.
The npm package @boulevard/react-components receives a total of 1 weekly downloads. As such, @boulevard/react-components popularity was classified as not popular.
We found that @boulevard/react-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.