chore: remove deprecated test file

This commit is contained in:
252675163 2020-05-17 16:24:10 +08:00 committed by Amour1688
parent 063af0e975
commit 951e973e93
2 changed files with 0 additions and 49 deletions

View File

@ -1,42 +0,0 @@
import { createMountedApp } from './util';
test('Spread (single object expression)', () => {
const props = {
innerHTML: 123,
other: '1',
};
const { node, dom } = createMountedApp({ render: () => <div {...props}></div> });
expect(dom.innerHTML).toBe('<div other="1">123</div>');
expect(node.props.other).toBe('1');
});
test('Spread (mixed)', () => {
const calls = [];
const data = {
id: 'hehe',
onClick() {
calls.push(3);
},
innerHTML: 2,
class: ['a', 'b'],
};
const { node, dom } = createMountedApp({
setup: () => () => (
<div
href="huhu"
{...data}
class={{ c: true }}
on-click={() => calls.push(4)}
hook-insert={() => calls.push(2)}
/>
),
});
expect(node.props.id).toBe('hehe');
expect(node.props.href).toBe('huhu');
expect(node.props.class).toBe(['a', 'b', { c: true }]);
expect(node.props.innerHTML).toBe('2');
expect(calls).toBe([1, 2]);
dom.click();
expect(calls).toBe([1, 2, 3, 4]);
});

View File

@ -1,7 +0,0 @@
import { createApp } from 'vue';
export const createMountedApp = function (compoent) {
const dom = document.createElement('div');
const App = createApp(compoent).mount(dom);
return { App, dom, node: App.$.subTree };
};