more tests, more unreachable code removed

pull/942/head
Rich Harris 8 years ago
parent b9c80b8728
commit 16d3f9cec9

@ -10,7 +10,6 @@ export default function components(validator: Validator, prop: Node) {
`The 'components' property must be an object literal`,
prop.start
);
return;
}
checkForDupes(validator, prop.value.properties);

@ -14,7 +14,6 @@ export default function computed(validator: Validator, prop: Node) {
`The 'computed' property must be an object literal`,
prop.start
);
return;
}
checkForDupes(validator, prop.value.properties);
@ -26,7 +25,6 @@ export default function computed(validator: Validator, prop: Node) {
`Computed properties can be function expressions or arrow function expressions`,
computation.value.start
);
return;
}
const params = computation.value.params;
@ -36,7 +34,6 @@ export default function computed(validator: Validator, prop: Node) {
`A computed value must depend on at least one property`,
computation.value.start
);
return;
}
params.forEach((param: Node) => {

@ -10,7 +10,6 @@ export default function helpers(validator: Validator, prop: Node) {
`The 'helpers' property must be an object literal`,
prop.start
);
return;
}
checkForDupes(validator, prop.value.properties);

@ -14,7 +14,6 @@ export default function methods(validator: Validator, prop: Node) {
`The 'methods' property must be an object literal`,
prop.start
);
return;
}
checkForAccessors(validator, prop.value.properties, 'Methods');

@ -9,7 +9,6 @@ export default function transitions(validator: Validator, prop: Node) {
`The 'transitions' property must be an object literal`,
prop.start
);
return;
}
checkForDupes(validator, prop.value.properties);

@ -0,0 +1,8 @@
[{
"message": "The 'components' property must be an object literal",
"loc": {
"line": 3,
"column": 2
},
"pos": 29
}]

@ -0,0 +1,5 @@
<script>
export default {
components: 'not an object literal'
};
</script>

@ -0,0 +1,8 @@
[{
"message": "The 'helpers' property must be an object literal",
"loc": {
"line": 3,
"column": 2
},
"pos": 29
}]

@ -0,0 +1,5 @@
<script>
export default {
helpers: 'not an object literal'
};
</script>

@ -0,0 +1,8 @@
[{
"message": "The 'methods' property must be an object literal",
"loc": {
"line": 3,
"column": 2
},
"pos": 29
}]

@ -0,0 +1,5 @@
<script>
export default {
methods: 'not an object literal'
};
</script>

@ -0,0 +1,8 @@
[{
"message": "The 'transitions' property must be an object literal",
"loc": {
"line": 3,
"column": 2
},
"pos": 29
}]

@ -0,0 +1,5 @@
<script>
export default {
transitions: 'not an object literal'
};
</script>

@ -0,0 +1,8 @@
[{
"message": "tag name must be two or more words joined by the '-' character",
"loc": {
"line": 3,
"column": 7
},
"pos": 34
}]

@ -0,0 +1,5 @@
<script>
export default {
tag: 'invalid'
};
</script>

@ -0,0 +1,8 @@
[{
"message": "'tag' must be a string literal",
"loc": {
"line": 3,
"column": 7
},
"pos": 34
}]

@ -0,0 +1,5 @@
<script>
export default {
tag: 42
};
</script>
Loading…
Cancel
Save