message: Add importer tests for isReactCreateElementCall
diff: *
  */
  -import { parse, noopImporter } from '../../../tests/utils';
  +import {
  + parse,
  + statement,
  + noopImporter,
  + makeMockImporter,
  +} from '../../../tests/utils';
  import isReactCreateElementCall from '../isReactCreateElementCall';
  describe('isReactCreateElementCall', () => {
  @@ -15,6 +20,13 @@ describe('isReactCreateElementCall', () => {
  return root.get('body', root.node.body.length - 1, 'expression');
  }
  + const mockImporter = makeMockImporter({
  + foo: statement(`
  + export default React.createElement;
  + import React from 'react';
  + `).get('declaration'),
  + });
  +
  describe('built in React.createElement', () => {
  it('accepts createElement called on React', () => {
  const def = parsePath(`
  @@ -85,5 +97,13 @@ describe('isReactCreateElementCall', () => {
  `);
  expect(isReactCreateElementCall(def, noopImporter)).toBe(true);
  });
  +
  + it('can resolve createElement imported from an intermediate module', () => {
  + const def = parsePath(`
  + import foo from "foo";
  + foo({});
  + `);
  + expect(isReactCreateElementCall(def, mockImporter)).toBe(true);
  + });
  });
  });
  