message: Add importer tests for isReactComponentMethod
diff: *
  */
  -import { expression, statement } from '../../../tests/utils';
  +import {
  + expression,
  + statement,
  + noopImporter,
  + makeMockImporter,
  +} from '../../../tests/utils';
  import isReactComponentMethod from '../isReactComponentMethod';
  describe('isReactComponentMethod', () => {
  + const mockImporter = makeMockImporter({
  + foo: statement(`
  + export default 'render';
  + `).get('declaration'),
  + });
  +
  it('returns true if the method is a component class method', () => {
  const def = statement('class Foo { render() {}}');
  const method = def.get('body', 'body', 0);
  - expect(isReactComponentMethod(method)).toBe(true);
  + expect(isReactComponentMethod(method, noopImporter)).toBe(true);
  });
  it('returns true if the method is a component `createClass` object method', () => {
  const def = expression('{ render() {}}');
  const method = def.get('properties', 0);
  - expect(isReactComponentMethod(method)).toBe(true);
  + expect(isReactComponentMethod(method, noopImporter)).toBe(true);
  });
  it('returns false if the method is not a component class method', () => {
  const def = statement('class Foo { bar() {}}');
  const method = def.get('body', 'body', 0);
  - expect(isReactComponentMethod(method)).toBe(false);
  + expect(isReactComponentMethod(method, noopImporter)).toBe(false);
  });
  it('returns false if the method is not a component `createClass` object method', () => {
  const def = expression('{ bar() {}}');
  const method = def.get('properties', 0);
  - expect(isReactComponentMethod(method)).toBe(false);
  + expect(isReactComponentMethod(method, noopImporter)).toBe(false);
  });
  it('returns false if the path is not a method or object property', () => {
  const def = statement('let foo = "bar";');
  - expect(isReactComponentMethod(def)).toBe(false);
  + expect(isReactComponentMethod(def, noopImporter)).toBe(false);
  + });
  +
  + it('resolves imported value of computed property', () => {
  + const def = statement(`
  + class Foo { [foo]() {}}
  + import foo from 'foo';
  + `);
  + const method = def.get('body', 'body', 0);
  + expect(isReactComponentMethod(method, mockImporter)).toBe(true);
  });
  });
  