React technical principles and code development practice: from Jest to Enzyme

1. Background Introduction React is a JavaScript library developed by Facebook for building user interfaces. Its original intention was to solve the problem of low view rendering efficiency in JavaScript single-page applications. Facebook is also using React internally for the development of internal projects. This article will introduce some knowledge points about React principles, component […]

Deploy YOLO pruning model to edge terminal device jeston-orin-nano method

I encountered a lot of pitfalls in the process. I have only recently finished all the bugs in the experiment and recorded them 1Foreword TensorRT is a high-performance deep learning inference optimization library officially provided by NVIDIA, supporting two programming languages API: C++ and Python . Under normal circumstances, deep learning model deployment will pursue […]

CF1381D The Majestic Brown Tree Snake

CF1381D The Majestic Brown Tree Snake Low Valley CF1381D The Majestic Brown Tree Snake The main idea of the title Given a tree with n n A tree with n nodes. There is a snake on the tree. The snake covers the head of the tree. s s s to the snake’s tail t t […]

Jest unit testing: a little hide and seek with the code!

Hi, fellow coders! In this golden October, the National Day overlaps with the Mid-Autumn Festival, and we have a special task – to find the mysterious “Mid-Autumn Cake” of the code through Jest unit testing! It’s a simple and fun adventure, as easy as looking for the moon at a Mid-Autumn Festival party. Let us […]

Testing Angular, VueJS, and React Components with Jest

Author: Zen and the Art of Computer Programming 1. Introduction In the past few years, front-end frameworks such as React, Angular, and Vue have gained the favor of more and more developers and have achieved impressive results. The emergence of these front-end frameworks has brought many fresh opportunities to the field of front-end development. Especially […]

Mocking VS Code extension API with Jest in unit tests

When unit testing the VS Code extension, we usually encounter a problem. The functions of the VS Code editor used in the code depend on the vscode library, but we did not add the vscode library in the unit test. The strong>vscode library depends, so it causes an error when running unit tests. Since the […]

Mocking VS Code extension API with Jest in unit tests

When unit testing the VS Code extension, we usually encounter a problem. The functions of the VS Code editor used in the code depend on the vscode library, but we did not add the vscode library in the unit test. The strong>vscode library depends, so it causes an error when running unit tests. Since the […]

Say goodbye to Jest using node’s built-in test runner

Reference https://nodejs.org/dist/latest-v20.x/docs/api/test.html#test-runner In the past, when we wrote unit tests, we had to install third-party dependencies. After version node 20.0.0, we can say goodbye to cumbersome third-party dependencies and use node’s built-in test runner directly. Related functions are stable after version 20.0.0, to use test runner please install node version >=20.0.0. use: import test from […]

Jeston NanoEnvironment Configuration – Deploy yolov5

【Jeston Nano】Environment Configuration – Deploy yolov5 1. Jeston Nano system initialization settings 1. Chinese language pack 2. Backup 3. Replace the source 2. Environment configuration, installation package 1. CUDA 2. pip3 3. jtop 4. Configure the libraries that may be required 5. Install the required dependent environment 6. Install the system-level dependencies of opencv, some […]

Vue-Test-Utils + Jest unit tests

Create a Vue project Create a project with vue-cli in the terminal $vue create vue-test Select Manually select features for manual selection feature configuration: Check Babel, TypeScript, Router , Unit Testing: Select Jest: Select In dedicated config files to configure each configuration information in the corresponding In the config file: ? Where do you prefer […]