How to use the react-addons-test-utils.isCompositeComponentWithType function in react-addons-test-utils

To help you get started, we’ve selected a few react-addons-test-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sheepsteak / react-shallow-testutils / specs / get-mounted-instance-spec.js View on Github external
it('should return the root component instance from renderer', function() {
    const renderer = createRenderer();
    renderer.render();

    const instance = getMountedInstance(renderer);

    // Since this is a component instance and *not* shallow render output we need
    // to use the existing React TestUtils.
    expect(isCompositeComponentWithType(instance, OtherComponent)).toBe(true);
  });
github keen / explorer / test / unit / components / explorer / visualization / index_spec.js View on Github external
it('is of the right type', () => {
      expect(TestUtils.isCompositeComponentWithType(component, Visualization)).toBe(true);
    });
    it('has one chart child component', () => {
github keen / explorer / test / unit / components / common / modal_spec.js View on Github external
it('is of the right type', function() {
      var modal = TestUtils.renderIntoDocument();
      assert.isTrue(TestUtils.isCompositeComponentWithType(modal, Modal));
    });
github keen / explorer / test / unit / components / explorer / visualization / chart_spec.js View on Github external
it('is of the right type', function() {
      assert.isTrue(TestUtils.isCompositeComponentWithType(this.component, Chart));
    });
    it('has a get started message when there is no query yet', function(){
github keen / explorer / test / unit / components / common / react_select_spec.js View on Github external
it('is of the right type', function() {
      assert.isTrue(TestUtils.isCompositeComponentWithType(this.component, ReactSelect));
    });
    it('has one input', function(){
github keen / explorer / test / unit / components / common / notice_spec.js View on Github external
it('is of the right type', function() {
      notice = {};
      component = TestUtils.renderIntoDocument();
      assert.isTrue(TestUtils.isCompositeComponentWithType(component, Notice));
    });
  });
github keen / explorer / test / unit / components / common / datepicker_spec.js View on Github external
it('is of the right type', function() {
      assert.isTrue(TestUtils.isCompositeComponentWithType(this.component, Datepicker));
    });
    it('has one input', function(){
github keen / explorer / test / unit / components / common / filter_value_fields_spec.js View on Github external
it('is of the right type', function() {
      assert.isTrue(TestUtils.isCompositeComponentWithType(this.component, FilterValueFields));
    });
github keen / explorer / test / unit / components / common / event_browser_spec.js View on Github external
it('is of the right type', function() {
      assert.isTrue(TestUtils.isCompositeComponentWithType(this.component, EventBrowser));
    });