import reaction from "react";income shallow from "enzyme";import app native "./App";it("App", () => const application = shallow(app />); expect(1).toEqual(1););the family member ingredient it"ns picking uns is :

income React, component native "react";import render indigenous "react-dom";// income "./styles/normalize.css";class application exoften tends ingredient render() rerotate ( div>appdiv> ); render(application />, document.getElementById("app"));However, running jest causes a failure:

Indifferent Violation: _registerComponent(...): Target container is no a DOM element.

via errorns

at Object. (src/App.js:14:48)at Object. (src/App.test.js:4:38)

the test papers references heat 4, i m sorry ins ns income of , that reasons a fail. Ns stack map claims line 14 that App.js ins ns reason for ns faitempt -- i beg your pardon ins nothing more 보다 the render call indigenous react-dom, somepoint I"ve never before hAD a difficulty via (ns application provides effectively native mine Webfill setup).

because that those interested (Webpack code):

module.exports = entry: "./src/App", output: filename: "bundle.js", path: "./dist" , module: loaders: < test: /.js?$/, exclude: /node_modules/, loader: "babel", query: presets: <"react", "es2015"> , test: /.css$/, loader: "style!css-loader?modules&importLoaders=1&localIdentName=_____" , test: /.scss$/, loader: "style!css-loader?modules&importLoaders=1&localIdentName=_____!sass" > and mine package.json:

"name": "tic-tac-dux", "version": "1.0.0", "description": "", "main": "index.js", "scripts": "dev": "webpack-dev-server --devTool evatogether --development --colorns --inheat --warm --content-base dist/", "test": "jest" , "jest": "moduleNameMapper": wav , "keywords": <>, "author": "", "license": "ISC", "devDependencies": "babel-core": "^6.17.0", "babel-jest": "^16.0.0", "babel-loader": "^6.2.5", "babel-polyfill": "^6.16.0", "babel-preset-es2015": "^6.16.0", "babel-preset-react": "^6.16.0", "css-loader": "^0.25.0", "enzyme": "^2.4.1", "jest": "^16.0.1", "jest-cli": "^16.0.1", "node-sass": "^3.10.1", "react-addons-test-utils": "^15.3.2", "react-dom": "^15.3.2", "sass-loader": "^4.0.2", "style-loader": "^0.13.1", "webpack": "^1.13.2", "webpack-dev-server": "^1.16.2" , "dependencies": "react": "^15.3.2", "react-dom": "^15.3.2" Oh, and if anyone is going come speak the ns div element isn"t gift loaded before the script, here"s mine index.html: