Skip to content

Instantly share code, notes, and snippets.

@joeyfigaro
Created September 6, 2016 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyfigaro/5573ca6b224252178a5eb0e5ac849846 to your computer and use it in GitHub Desktop.
Save joeyfigaro/5573ca6b224252178a5eb0e5ac849846 to your computer and use it in GitHub Desktop.
AVA testing issue regarding dependency in node_modules

Error after running tests:

/<ProjectRepository>/node_modules/react-ga/src/index.js:51
          m = s.getElementsByTagName(o)[0];
                ^
TypeError: s.getElementsByTagName is not a function

Configuration from package.json:

"ava": {
  "files": [
    "./test"
  ],
  "source": [
		"src/app/**/*.js",
		"!src/app/utils/**/*.js"
  ],
  "concurrency": 5,
  "failFast": true,
  "tap": true,
  "powerAssert": false,
  "require": [
    "babel-register",
		"./test/setup.js"
  ],
  "babel": "inherit"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment