Skip to content

Commit

Permalink
Converted inferno-hyperscript tests to TSX for #1632
Browse files Browse the repository at this point in the history
  • Loading branch information
Havunen committed Apr 13, 2024
1 parent 6b2714a commit 7ddfedc
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { h } from 'inferno-hyperscript';
import { Component, createRef, forwardRef, Fragment, render } from 'inferno';
import { Component, createRef, forwardRef, Fragment, RefObject, render } from 'inferno';

describe('HyperScript (non-JSX)', () => {
let container;
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('HyperScript (non-JSX)', () => {
return h('div', props, children);
}

function Test3({ children, ...props }) {
function Test3({ children }) {
return h('div', { className: 'test3' }, children);
}

Expand Down Expand Up @@ -341,7 +341,7 @@ describe('HyperScript (non-JSX)', () => {
});

it('Should handle node with refs', (done) => {
let myRef = 'myRef';
let myRef;

const app = () => {
const node = () =>
Expand All @@ -360,7 +360,7 @@ describe('HyperScript (non-JSX)', () => {

let shouldUpdate = false;

class Test2 extends Component {
class Test2 extends Component<{foo: string}> {
shouldComponentUpdate() {
return shouldUpdate;
}
Expand Down Expand Up @@ -427,6 +427,8 @@ describe('HyperScript (non-JSX)', () => {
expect(FancyButton.render).toBeDefined();

class Hello extends Component {
private readonly btn: RefObject<Element>;

constructor(props) {
super(props);

Expand Down

0 comments on commit 7ddfedc

Please sign in to comment.