These are chat archives for airbnb/enzyme

Nov 2017
Dimitris Karagiannis
Nov 15 2017 14:35
Hello! If anyone feels like helping me figure this out, it'll be much appreciated
Nov 15 2017 16:38
hey all, I realise this might not specifically be an enzyme issue but I have an inline svg in my component but I get this error when running my tests Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in. Check the render method ofTopNav.
I have my mocha using this
var babel = require('babel-core/register')
function noop () {
  return null
require.extensions['.png'] = noop
require.extensions['.svg'] = noop
require.extensions['.ttf'] = noop
also tried returning a react element doesnt seem to work :(
if you have any idea how to fix this I'd be appreciative :)