/.babelrc

 {
"presets": ["@babel/preset-env","@babel/preset-react"],
"plugins":[
"@babel/plugin-proposal-class-properties"
]
}

/jest.config.js

 module.exports = {

   "setupFiles": ["./tests/setup.js"],

   testEnvironment: "node",

 };

/package.json

   "devDependencies": {
"babel-core": "7.0.0-bridge.0",
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"babel-jest": "^23.6.0",
"enzyme": "/home/rudy/.config/yarn/global/node_modules/enzyme",
"enzyme-adapter-react-16": "/home/rudy/.config/yarn/global/node_modules/enzyme-adapter-react-16",
"jest": "^23.6.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "jest",
"eject": "react-scripts eject"
},

/tests/setup.js

 import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });

react config test env with jest and create-react-app 1的更多相关文章

  1. [React] Use the Fragment Short Syntax in Create React App 2.0

    create-react-app version 2.0 added a lot of new features. One of the new features is upgrading to Ba ...

  2. [React] {svg, css module, sass} support in Create React App 2.0

    create-react-app version 2.0 added a lot of new features. One of the new features is added the svgr  ...

  3. 使用create react app教程

    This project was bootstrapped with Create React App. Below you will find some information on how to ...

  4. 如何扩展 Create React App 的 Webpack 配置

    如何扩展 Create React App 的 Webpack 配置  原文地址https://zhaozhiming.github.io/blog/2018/01/08/create-react-a ...

  5. 深入 Create React App 核心概念

    本文差点难产而死.因为总结的过程中,多次怀疑本文是对官方文档的直接翻译和简单诺列:同时官方文档很全面,全范围的介绍无疑加深了写作的心智负担.但在最终的梳理中,发现走出了一条与众不同的路,于是坚持分享出 ...

  6. 在 .NET Core 5 中集成 Create React app

    翻译自 Camilo Reyes 2021年2月22日的文章 <Integrate Create React app with .NET Core 5> [1] Camilo Reyes ...

  7. tap news:week5 0.0 create react app

    参考https://blog.csdn.net/qtfying/article/details/78665664 先创建文件夹 安装create react app 这个脚手架(facebook官方提 ...

  8. 利用 Create React Native App 快速创建 React Native 应用

    本文介绍的 Create-React-Native-App 是非常 Awesome 的工具,而其背后的 Expo 整个平台也让笔者感觉非常的不错.笔者目前公司是采用 APICloud 进行移动应用开发 ...

  9. react / config\webpack.config.js 编译后去掉map 减小体积 shouldUseSourceMap = false

    react / config\webpack.config.js 编译后去掉map 减小体积 shouldUseSourceMap = false

随机推荐

  1. openwrt,mjpeg流,wifi摄像头与APP联动,拍照、录像

    最近公司好忙,自己主管的产品又忙着上线,好久都没更新博客了. 最近产品在做一款wifi摄像头,摄像头与手机同时连接在一个局域网内,即可实现摄像头图像在手机显示,并且拍照录像等功能 mjpeg是一张一张 ...

  2. spring案列——annotation配置

    一.需要的jar包 spring.jar commons-loggin.jar commons-loggin.jar commons-annotation.jar 二.项目结构 三.entity pa ...

  3. iOS应用开发最佳实践

    <iOS应用开发最佳实践> 基本信息 作者: 王浩    出版社:电子工业出版社 ISBN:9787121207679 上架时间:2013-7-22 出版日期:2013 年8月 开本:16 ...

  4. delphi 升级到xe7后的一些个人经验

    http://blog.csdn.net/span12/article/details/42522091 你只要记住 字符串使用变了.VCL 下面所有的 char 改 ansichar string ...

  5. Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1

    上一篇博客,Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1,解决了由于 string.xml 字符导致的: 而这篇博客 ...

  6. [C#]SharpSSH-一个可以使用SSH连接的.NET库

    A Secure Shell (SSH) library for .NET 觉得有用,就记录下来了 http://www.tamirgal.com/blog/page/SharpSSH.aspx ht ...

  7. Index--过滤索引和参数化

    --============================================ 领导指点我去给某台数据库调优下,结果屁颠屁颠地干完,还自我感觉良好,刚刚别人博客时,才发现自己踩坑了!! ...

  8. javascript 对象克隆

    浅克隆 先看代码: /** * 浅克隆 克隆传入对象,只克隆一层 * @param {any} source */ function shallowClone(source) { var tiaget ...

  9. 网易云基于 Kubernetes 的深度定制化实践

    本文由  网易云发布. 2017 年,Kubernetes 超越 Mesos 和 Docker Swarm成为最受欢迎的容器编排技术.网易云从 2015 下半年开始向 Kubernetes 社区贡献代 ...

  10. C++命令行画心形<转载>

    #include <stdio.h> int main() { for (float y = 1.5f; y > -1.5f; y -= 0.1f) { for (float x = ...