Jest

Jest

DevOps / Build, Test, Deploy / Javascript Testing Framework

We chose to use React as our frontend. This will allow us to effectively manage and condense our code into repeatable components to avoid repetition and promote clarity. We have also decide to use Redux as it has proven to be an efficient way to manage a state space given a complex and scalable product such as ours. To avoid costly time and effort with boiler plate styling of common components, we have decided to use the Semantic UI React open-source library as it provides great customization and clear documentation. Lastly, we will be using Jest for frontend Unit testing, as it is a popular framework and has great support for React.

READ MORE
3 upvotes·241.7K views

For our web application's backend, we have decided to create our server using Node.js and npm as our package manager, as this allows us to utilize a developer's skills and knowledge in JS for both the frontend and backend. ExpressJS provides us an easy to learn framework that saves us effort, time and improves productivity in creating our server, while affording us room to add complexity. Passport will be used to implement Oauth2.0 authentication for our web application, allowing our users to sign in with their existing accounts (no one wants to create a remember the password for yet another account). Mongoose will be used to make calls to our backend, this framework will help make these calls more accessible and organized. We have decided to use Redis on our server for any caching we need. This will greatly speed up retrieval times and reduce calls to external sources for any data that could instead be cached on our server. Lastly, we will use Jest as our unit testing framework for our backend as it is very popular and has support for Node.js . Furthermore, this is the same testing framework we will be using for our frontend, thus allowing use quickly learn and implement testing in both frontend and backend.

We have decided to use Heroku as our hosting platform for our server. Heroku provides clear documentation and a quick and simple process to host Node.js applications with their service, along with great support with our version control Git. Furthermore, Heroku also provides a free tier, which allows us to deploy and test our web application from the beginning of development.

MongoDB is our chosen database as a NoSQL database will give us flexibility in storing different types of data and room for scaling our product. We have decided to use MongoDB Atlas to host our database. As they provide a quick and simple start up along with a free tier to host database. Thus, allowing us to rapidly test our server's uses with the database.

READ MORE
4 upvotes·77.5K views
QA Engineer ·
Needs advice
on
JestJest
and
Robot FrameworkRobot Framework

Jest and Robot Framework are both named 'Testing Framework' on many sites that I visit. Both aim at testing the client-side of a web application.

I am aware there are differences in their implementation (JavaScript vs Python) and their purpose (Unit test vs Acceptance test). Still, they seem to overlap a lot. Is there a use case to implement BOTH testing frameworks? Suppose a team has written lots of Jest test cases, and code coverage is really good. Is there still a reason to add Robot Framework on top of that?

READ MORE
6 upvotes·42.5K views
Needs advice
on
LoopBackLoopBack
and
NestJSNestJS

We inherited this project and the backend is using LoopBack v3. I haven't taken a look at Loopback.io v4, but I'm planning to replace it. The reason being is that Loopback v3 documentation is a bit confusing and we are having trouble packaging the build using Webpack. Not to mention, integrating unit tests (latest Jest).

I still think Loopback is a great tool, but their documentation is really "messy" and hard to navigate through. There's also a constraint of time from our side. So what's the best option out there?

Should I try upgrading to Loopback v4, or trying other stuff? (i.e. NestJS)

Thanks!

READ MORE
6 upvotes·225K views
Replies (5)
Senior Software Engineer at Autodesk·
Recommends
on
NestJS

As part of a new service we planned, we decided to choose Loopback v3 and v4 as POC and it was a nightmare.

After 2 weeks of fighting with the loopback framework and try to understand the documentation, we decided to search for other frameworks, we tried Adonis, Hapi, and many more.

After about a month of multiple POCs (I guess we had too much free time and we wanted something for the long run), we came across Nestjs when it was version 4 or 5 I think and it was great, we started to promote this framework within the company and we are using this framework in multiple new services in high scale and it works great! Super flexible and full express or fastify support.

It has monorepo support and I'm personally using it with NX for monorepo (Nx, terraform and nestjs with typeorm)

It's not yet perfect but has a great community and its expanding pretty nice :)

READ MORE
6 upvotes·1.8K views
Founder CEO / CTO at Unlimited Design and Technology·
Recommends
on
LoopBack

Loopback 4 allows you to modify every detail in the source code. Not like v3, you have to follow the hook and I admit that v3 has messy documentation. I think because they are developing too fast to care about the document. However, when I move to v4, actually if you are familiar with v3, it will be easy for you to use v4. And final points, you have to have knowledge about IoC to understand its concept.

READ MORE
3 upvotes·293 views
View all (5)
Senior Fullstack Developer at QUANTUSflow Software GmbH·

Our whole Vue.js frontend stack (incl. SSR) consists of the following tools:

  • Nuxt.js consisting of Vue CLI, Vue Router, vuex, Webpack and Sass (Bundler for HTML5, CSS 3), Babel (Transpiler for JavaScript),
  • Vue Styleguidist as our style guide and pool of developed Vue.js components
  • Vuetify as Material Component Framework (for fast app development)
  • TypeScript as programming language
  • Apollo / GraphQL (incl. GraphiQL) for data access layer (https://apollo.vuejs.org/)
  • ESLint, TSLint and Prettier for coding style and code analyzes
  • Jest as testing framework
  • Google Fonts and Font Awesome for typography and icon toolkit
  • NativeScript-Vue for mobile development

The main reason we have chosen Vue.js over React and AngularJS is related to the following artifacts:

  • Empowered HTML. Vue.js has many similar approaches with Angular. This helps to optimize HTML blocks handling with the use of different components.
  • Detailed documentation. Vue.js has very good documentation which can fasten learning curve for developers.
  • Adaptability. It provides a rapid switching period from other frameworks. It has similarities with Angular and React in terms of design and architecture.
  • Awesome integration. Vue.js can be used for both building single-page applications and more difficult web interfaces of apps. Smaller interactive parts can be easily integrated into the existing infrastructure with no negative effect on the entire system.
  • Large scaling. Vue.js can help to develop pretty large reusable templates.
  • Tiny size. Vue.js weights around 20KB keeping its speed and flexibility. It allows reaching much better performance in comparison to other frameworks.
READ MORE
23 upvotes·1 comment·4.7M views
rishabh2712
rishabh2712
·
April 25th 2020 at 6:24AM

Thanks a lot for sharing.

·
Reply
Shared insights
at

I'm working as one of the engineering leads in RunaHR. As our platform is a Saas, we thought It'd be good to have an API (We chose Ruby and Rails for this) and a SPA (built with React and Redux ) connected. We started the SPA with Create React App since It's pretty easy to start.

We use Jest as the testing framework and react-testing-library to test React components. In Rails we make tests using RSpec.

Our main database is PostgreSQL, but we also use MongoDB to store some type of data. We started to use Redis  for cache and other time sensitive operations.

We have a couple of extra projects: One is an Employee app built with React Native and the other is an internal back office dashboard built with Next.js for the client and Python in the backend side.

Since we have different frontend apps we have found useful to have Bit to document visual components and utils in JavaScript.

READ MORE
22 upvotes·2.9M views
Shared insights
on
CypressCypressJestJest

As we all know testing is an important part of any application. To assist with our testing we are going to use both Cypress and Jest. We feel these tools complement each other and will help us get good coverage of our code. We will use Cypress for our end to end testing as we've found it quite user friendly. Jest will be used for our unit tests because we've seen how many larger companies use it with great success.

READ MORE
7 upvotes·815.6K views