Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7bc13e0

Browse files
committedOct 20, 2018
Add more tests in utils
1 parent b3032c9 commit 7bc13e0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
 

‎tests/lib/utils/vue-component.js

+26
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ function validTests (ext) {
9696
foo: {}
9797
}`,
9898
parserOptions
99+
},
100+
{
101+
filename: `test.${ext}`,
102+
code: `export default (Foo as FooConstructor<Foo>).extend({})`,
103+
parser: 'typescript-eslint-parser',
104+
parserOptions
105+
},
106+
{
107+
filename: `test.${ext}`,
108+
code: `export default Foo.extend({})`,
109+
parser: 'typescript-eslint-parser',
110+
parserOptions
99111
}
100112
]
101113
}
@@ -132,6 +144,20 @@ function invalidTests (ext) {
132144
parserOptions,
133145
errors: [makeError(1)]
134146
},
147+
{
148+
filename: `test.${ext}`,
149+
code: `export default (Vue as VueConstructor<Vue>).extend({})`,
150+
parser: 'typescript-eslint-parser',
151+
parserOptions,
152+
errors: [makeError(1)]
153+
},
154+
{
155+
filename: `test.${ext}`,
156+
code: `export default Vue.extend({})`,
157+
parser: 'typescript-eslint-parser',
158+
parserOptions,
159+
errors: [makeError(1)]
160+
},
135161
{
136162
filename: `test.${ext}`,
137163
code: `

0 commit comments

Comments
 (0)
Please sign in to comment.