Skip to content

Commit 2a27435

Browse files
committed
chore(wtr): copy files instead of using symlinks
1 parent 8e8c59e commit 2a27435

File tree

3,142 files changed

+57267
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,142 files changed

+57267
-2
lines changed

packages/@lwc/integration-not-karma/test

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@lwc/integration-not-karma/test-hydration

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default {
2+
snapshot(target) {
3+
const span = target.shadowRoot.querySelector('span');
4+
5+
return {
6+
span,
7+
};
8+
},
9+
test(elm, snapshot, consoleCalls) {
10+
const span = elm.shadowRoot.querySelector('span');
11+
expect(span).toBe(snapshot.span);
12+
13+
expect(consoleCalls.warn).toHaveSize(0);
14+
expect(consoleCalls.error).toHaveSize(0);
15+
},
16+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<span>{foo}<!-- yolo -->{bar}</span>
3+
</template>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class extends LightningElement {
4+
foo = '';
5+
bar = '';
6+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
export default {
2+
props: {},
3+
snapshot(target) {
4+
const first = target.shadowRoot.querySelector('.first');
5+
const second = target.shadowRoot.querySelector('.second');
6+
7+
return {
8+
first,
9+
second,
10+
};
11+
},
12+
advancedTest(target, { Component, hydrateComponent, consoleSpy, container, selector }) {
13+
const snapshotBeforeHydration = this.snapshot(target);
14+
hydrateComponent(target, Component, this.props);
15+
const hydratedTarget = container.querySelector(selector);
16+
const snapshotAfterHydration = this.snapshot(hydratedTarget);
17+
18+
for (const snapshotKey of Object.keys(snapshotBeforeHydration)) {
19+
expect(snapshotBeforeHydration[snapshotKey])
20+
.withContext(
21+
`${snapshotKey} should be the same DOM element both before and after hydration`
22+
)
23+
.toBe(snapshotAfterHydration[snapshotKey]);
24+
expect(snapshotBeforeHydration[snapshotKey].childNodes)
25+
.withContext(
26+
`${snapshotKey} should have the same number of child nodes before & after hydration`
27+
)
28+
.toHaveSize(snapshotAfterHydration[snapshotKey].childNodes.length);
29+
}
30+
31+
expect(consoleSpy.calls.warn).toHaveSize(0);
32+
expect(consoleSpy.calls.error).toHaveSize(0);
33+
},
34+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<template>
2+
<p class="first">{zeroLengthText}‍{zeroLengthText}‍</p>
3+
<p class="second">{zeroLengthText}{zeroLengthText}{zeroLengthText}{zeroLengthText}</p>
4+
</template>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class Main extends LightningElement {
4+
zeroLengthText = '';
5+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export default {
2+
snapshot(target) {
3+
const div = target.shadowRoot.querySelector('div');
4+
return {
5+
div,
6+
class: div.getAttribute('class'),
7+
};
8+
},
9+
test(target, snapshots) {
10+
const div = target.shadowRoot.querySelector('div');
11+
expect(div).toBe(snapshots.div);
12+
expect(div.getAttribute('class')).toBe(snapshots.class);
13+
},
14+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<div class={className}></div>
3+
</template>

0 commit comments

Comments
 (0)