Welcome! 👋
In this repository we hope to share with the open source community guidelines, best practices, and technical documentation that we follow and work on in Nielsen.
Guidelines & Best Practices documentation shared by Nielsen with the Open Source community
License: Apache License 2.0
Welcome! 👋
In this repository we hope to share with the open source community guidelines, best practices, and technical documentation that we follow and work on in Nielsen.
following by #34 we decided to add comments inside all "don't" examples. it'd help your readers to understand better the main idea for each section.
These are the issues we raised during this meeting:
Participants:
@lidoravitan @einatnielsen @liadShiranNielsen @MatanBorenkraoutNielsen
Cons:
https://reactjs.org/docs/testing-recipes.html - make a research about Act pattern in context to React and RTL. Obviously, go through the testing recipes.
Snapshots - Do we want to encourage using snapshots? #6
POC - FnComponent, ClassComponent and Redux Connected Component with RTL.
internationalization and localization are means of adapting application to different languages. in context to front-end development it could be internal implementation or 3rd party package. However, In terms of testing we want to explain what're the guidelines to test i18n case.
usually i18n implementation is key/value map for each language, which means inside components we use keys to render reach static text instead of write the actual text. for example:
without i18n:<div>hello world </div>
with I18n: <div>formatMessage('examples.hello.world')</div>
References
https://testing-library.com/docs/example-react-intl
https://reactjs.org/docs/testing-recipes.html - make a research about Act pattern in context to React and RTL. Obviously, go through the testing recipes.
Snapshots - Do we want to encourage using snapshots? #9
Sync for the last action items
Add mocks and spy guidelines - @MatanBorenkraoutNielsen #17,#18
Add Redux guidelines - @lidoravitan #15
Getting ready to release.
This issue is related to the Arrange - Act - Assert principal and especially in React using the act
function
Add an example of how to test reducers, selectors and actions.
you can take examples from Redux recipes
Make a decision about our Repo responsibilities.
Make a research for Enzyme vs React Testing Library.
Is it me, or Do
and Don't
sections are mixed up in here? https://github.com/nielsen-oss/docs/tree/master/javascript/testing#redux-connected-component
Currently it says one should mock action creators instead of verifying result in DOM.
The purpose of this issue is to review the pros and cons between Enzyme and React Testing Library.
RTL Pros:
Enzyme Cons:
Add an example of how to test components that have timers in them,
this can be based on the jest useFakeTimers
approach here
currently, we say that hook testing is not preferred but component testing should test it along the way instead. this is true for an internal hook for the sake of the component.
however, when the hook is to be shared across components, it should be tested in isolation as a standalone hook and it is the best practice
We need to cover e2e testing approaches in the style guide.
The explanation should mainly be about how we use the Page Object pattern to interact with the tested page and include code examples of a test that uses a Page Object.
In addition, we need to explain concepts like flows and selectors and how they fit into the e2e testing approach.
The examples should show how we use cypress for e2e tests.
Round Table
we want to involve the group with the testing style guide initiative. First, we want to share our knowledge with the group. second, we want to encourage the group to contribute.
actions
We already know agree snapshot testing are totally ok. however, there are only few cases we want to encourage them. let's add extensive exploration about snapshot testing. #34
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.