import reaction from "react";import shallow from "enzyme";import app from "./App";it("App", () => const app = shallow(); expect(1).toEqual(1););The family member component it’s picking up is :

import React, ingredient native "react";import render from "react-dom";// income "./styles/normalize.css";class application extends ingredient render() return (
); render(, document.getElementById("app"));However, runningjestcauses a failure:

Invariant Violation: _registerComponent(...): Target container is not a DOM element.

With errors

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

The test documents references heat 4, i m sorry is the import of, that reasons a fail. The ridge trace states line 14 ofApp.jsis the factor for the failure — which is nothing much more than the render contact fromreact-dom, something I’ve never had actually a an obstacle with (the application renders properly from mine Webpack setup).

For those interested.

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=[name>__[local>___[hash:base64:5>" , test: /\.scss$/, loader: "style!css-loader?modules&importLoaders=1&localIdentName=[name>__[local>___[hash:base64:5>!sass" > And mypackage.json:

"name": "tic-tac-dux", "version": "1.0.0", "description": "", "main": "index.js", "scripts": "dev": "webpack-dev-server --devtool eval --progress --colors --inline --hot --content-base dist/", "test": "jest" , "jest": "moduleNameMapper": webp , "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" The div aspect isn’t being loaded prior to the script