Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit fb6097a

Browse files
committed
Added new test
1 parent 988089b commit fb6097a

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"parse5": "latest",
2828
"lru-cache": "latest",
2929
"rollup-pluginutils": "latest",
30-
"Promise": "latest",
3130
"promise": "latest",
3231
"postcss": "latest",
3332
"object-assign": "latest",

test/expects/deadcode.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var evens = [2,4,6,8]
2+
var odds = evens.map(v => v + 1)
3+
var basic = { template: "<h1 :id=id @click=hi>hello</h1><input type=text>",
4+
data() {
5+
return odds
6+
}
7+
}
8+
9+
module.exports = basic

test/fixtures/basic.vue

-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
<style>
2-
html {
3-
font-size: 20px;
4-
}
5-
</style>
6-
71
<template>
82
<h1 :id="id" @click="hi">hello</h1>
93
<input type="text">
104
</template>
115

126
<script>
13-
class Test {
14-
ok() {}
15-
}
16-
177
var evens = [2,4,6,8]
188
var odds = evens.map(v => v + 1)
199
export default {

test/fixtures/deadcode.vue

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<h1 :id="id" @click="hi">hello</h1>
3+
<input type="text">
4+
</template>
5+
6+
<script>
7+
class Test {
8+
ok() {}
9+
}
10+
11+
var evens = [2,4,6,8]
12+
var odds = evens.map(v => v + 1)
13+
export default {
14+
data() {
15+
return odds
16+
}
17+
}
18+
</script>

0 commit comments

Comments
 (0)