From 951e973e93f13170ecda886ce84cf57a685e667a Mon Sep 17 00:00:00 2001
From: 252675163 <252675163@qq.com>
Date: Sun, 17 May 2020 16:24:10 +0800
Subject: [PATCH] chore: remove deprecated test file
---
test/spread.test.js | 42 ------------------------------------------
test/util.js | 7 -------
2 files changed, 49 deletions(-)
delete mode 100644 test/spread.test.js
delete mode 100644 test/util.js
diff --git a/test/spread.test.js b/test/spread.test.js
deleted file mode 100644
index 235d512..0000000
--- a/test/spread.test.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import { createMountedApp } from './util';
-
-test('Spread (single object expression)', () => {
- const props = {
- innerHTML: 123,
- other: '1',
- };
- const { node, dom } = createMountedApp({ render: () =>
});
- expect(dom.innerHTML).toBe('123
');
- 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: () => () => (
- 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]);
-});
diff --git a/test/util.js b/test/util.js
deleted file mode 100644
index 731513a..0000000
--- a/test/util.js
+++ /dev/null
@@ -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 };
-};