Skip to content

Commit

Permalink
fix(engine): test was incorrect (#1393)
Browse files Browse the repository at this point in the history
  • Loading branch information
caridy authored and ekashida committed Jul 3, 2019
1 parent 5d4dc4d commit 4960afe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/@lwc/engine/src/framework/__tests__/watcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { createElement, LightningElement } from '../main';

describe('watcher', () => {
describe('integration', () => {
it('should rerender the component if any reactive slot changes', () => {
it('should not rerender the component if new elements are slotted', () => {
let counter = 0;

const childTmpl = compileTemplate(`
Expand Down Expand Up @@ -57,8 +57,9 @@ describe('watcher', () => {
document.body.appendChild(elm);
elm.updateRound();

Promise.resolve().then(_ => {
expect(counter).toBe(2);
return Promise.resolve().then(_ => {
// parent slotted into child, not need to rerender child
expect(counter).toBe(1);
});
});

Expand Down

0 comments on commit 4960afe

Please sign in to comment.