23 lines
989 B
JavaScript
23 lines
989 B
JavaScript
|
import { __extends } from "tslib";
|
||
|
import * as React from 'react';
|
||
|
import * as ReactTestUtils from 'react-dom/test-utils';
|
||
|
import { BaseComponent } from './BaseComponent';
|
||
|
describe('BaseComponent', function () {
|
||
|
it('can resolve refs', function () {
|
||
|
// eslint-disable-next-line deprecation/deprecation
|
||
|
var Foo = /** @class */ (function (_super) {
|
||
|
__extends(Foo, _super);
|
||
|
function Foo() {
|
||
|
return _super !== null && _super.apply(this, arguments) || this;
|
||
|
}
|
||
|
Foo.prototype.render = function () {
|
||
|
// eslint-disable-next-line deprecation/deprecation
|
||
|
return React.createElement("div", { ref: this._resolveRef('root') });
|
||
|
};
|
||
|
return Foo;
|
||
|
}(BaseComponent));
|
||
|
var component = ReactTestUtils.renderIntoDocument(React.createElement(Foo, null));
|
||
|
expect(component.root).toBeTruthy();
|
||
|
});
|
||
|
});
|
||
|
//# sourceMappingURL=BaseComponent.test.js.map
|