[CLEANUP] run prettier on the codebase

This commit is contained in:
Géry Debongnie
2020-04-06 13:39:59 +02:00
committed by aab-odoo
parent 8d0d8538ad
commit ddf30a8a97
4 changed files with 20 additions and 9 deletions
+10 -6
View File
@@ -29,25 +29,29 @@ describe("mount targets", () => {
test("can attach a component to an existing node (if same tagname)", async () => {
class App extends Component {
static template = xml`<div t-att-class="state.customClass">app<p>another tag</p></div>`;
state = useState({customClass: 'custom'});
state = useState({ customClass: "custom" });
}
const div = document.createElement("div");
div.classList.add('arbitrary');
div.classList.add("arbitrary");
div.innerHTML = `<p>pre-existing</p>`;
fixture.appendChild(div);
const app = new App();
await app.mount(div, { position: "self" });
expect(fixture.innerHTML).toBe(`<div class="arbitrary custom"><p>pre-existing</p>app<p>another tag</p></div>`);
expect(fixture.innerHTML).toBe(
`<div class="arbitrary custom"><p>pre-existing</p>app<p>another tag</p></div>`
);
expect(div).toBe(app.el);
app.state.customClass = 'custom2';
app.state.customClass = "custom2";
await nextTick();
expect(fixture.innerHTML).toBe(`<div class="arbitrary custom2"><p>pre-existing</p>app<p>another tag</p></div>`);
expect(fixture.innerHTML).toBe(
`<div class="arbitrary custom2"><p>pre-existing</p>app<p>another tag</p></div>`
);
expect(div).toBe(app.el);
app.unmount()
app.unmount();
// This assert is a best guess
// The use case it covers was not really thought through
// and may change in the future