Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: React test renderer wrapper #1649

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion env.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const version = process.argv[2];
// 6. install all of the package's peer deps at the top level

var root = process.cwd();
var adapterName = `enzyme-adapter-react-${version}`;
var adapterName = `enzyme-adapter-react-renderer`;
var adapterPackageJsonPath = path.join(root, 'packages', adapterName, 'package.json');
var testPackageJsonPath = path.join(root, 'packages', 'enzyme-test-suite', 'package.json');

Expand Down
6 changes: 6 additions & 0 deletions packages/enzyme-adapter-react-renderer/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": ["airbnb"],
"plugins": [
["transform-replace-object-assign", "object.assign"],
],
}
2 changes: 2 additions & 0 deletions packages/enzyme-adapter-react-renderer/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_book/
build/
12 changes: 12 additions & 0 deletions packages/enzyme-adapter-react-renderer/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"rules": {
"import/no-extraneous-dependencies": 0,
"import/no-unresolved": 0,
"import/extensions": 0,
"react/no-deprecated": 0,
"react/no-find-dom-node": 0,
"react/no-multi-comp": 0,
"no-underscore-dangle": 0,
"class-methods-use-this": 0
}
}
1 change: 1 addition & 0 deletions packages/enzyme-adapter-react-renderer/.npmignore
1 change: 1 addition & 0 deletions packages/enzyme-adapter-react-renderer/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
1 change: 1 addition & 0 deletions packages/enzyme-adapter-react-renderer/README.md
68 changes: 68 additions & 0 deletions packages/enzyme-adapter-react-renderer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "enzyme-adapter-react-renderer",
"version": "0.0.1",
"description": "JavaScript Testing utilities for React",
"homepage": "http://airbnb.io/enzyme/",
"main": "build",
"scripts": {
"clean": "rimraf build",
"lint": "eslint --ext js,jsx .",
"pretest": "npm run lint",
"prebuild": "npm run clean",
"build": "babel src --out-dir build",
"watch": "npm run build -- -w",
"prepublish": "npm run build && safe-publish-latest"
},
"repository": {
"type": "git",
"url": "https://github.com/airbnb/enzyme.git"
},
"keywords": [
"javascript",
"shallow rendering",
"shallowRender",
"test",
"reactjs",
"react",
"flux",
"testing",
"test utils",
"assertion helpers",
"tdd",
"mocha"
],
"author": "Leland Richardson <[email protected]>",
"license": "MIT",
"dependencies": {
"cheerio": "^1.0.0-rc.2",
"enzyme-adapter-utils": "^1.3.0",
"has": "^1.0.1",
"invariant": "^2.2.4",
"is-subset": "^0.1.1",
"lodash": "^4.17.4",
"object.entries": "^1.0.4",
"object.values": "^1.0.4",
"object-is": "^1.0.1",
"react-is": "^16.3.2",
"react-reconciler": "^0.7.0",
"react-test-renderer": "^16.3.2",
"rst-selector-parser": "^2.2.3"
},
"peerDependencies": {
"enzyme": "^3.0.0",
"react": "^16.3.2",
"react-dom": "^16.3.2"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"enzyme": "^3.0.0",
"eslint": "^4.18.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.6.1",
"in-publish": "^2.0.0",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.1"
}
}
Loading