Skip to content

Commit

Permalink
LV: Fix tests for new universal hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
loganvolkers committed Mar 9, 2021
1 parent 84f3543 commit 4df42d4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/tests/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { Component, Prop, h, Host } from '@stencil/core';
import { ContextProvider } from 'dom-context';
import { createContext } from '../stencil-context';
import { withHooks, useEffect, useState, useDomContext, useDomContextState, useReducer, useMemo, useRef, useCallback } from '../stencil-hooks';
import * as HooksAPI from '../stencil-hooks';
import { mockFunction } from './mockFunction';
import { setImplementation } from '@saasquatch/universal-hooks';
setImplementation(HooksAPI);

@Component({
tag: 'test-component',
Expand Down Expand Up @@ -356,10 +359,9 @@ export class KillerParent {
window['lifecycleCalls']('parent.render.end');
return (
<Host>
<div
ref={el => ref.current=el}>
<innocent-child></innocent-child>
</div>
<div ref={el => (ref.current = el)}>
<innocent-child></innocent-child>
</div>
</Host>
);
}
Expand Down Expand Up @@ -404,7 +406,9 @@ export class InnocentChild {
window['lifecycleCalls'](ref.current + '.render.end');
return (
<Host>
<div>{ref.current} and {state}</div>
<div>
{ref.current} and {state}
</div>
</Host>
);
}
Expand Down

0 comments on commit 4df42d4

Please sign in to comment.