Skip to content

Commit b323251

Browse files
committed
Fix tests because of Vue.js upgrade
1 parent caf7674 commit b323251

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/BetterInputTag.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
</template>
2727

2828
<script>
29-
/*eslint-disable*/
29+
/* eslint-disable */
3030
const validators = {
3131
email: new RegExp(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),
3232
url: new RegExp(/^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i),
3333
text: new RegExp(/^[a-zA-Z]+$/),
3434
digits: new RegExp(/^[\d() \.\:\-\+#]+$/),
3535
isodate: new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/)
3636
}
37-
/*eslint-enable*/
37+
/* eslint-enable */
3838
3939
export default {
4040
name: 'InputTag',

test/BetterInputTag.spec.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('BetterInputTag.vue', () => {
1212

1313
beforeEach((cb) => {
1414
BetterInputTagComponent = new ClonedComponent({
15-
data () { return { tags: [] } }
15+
propsData: { tags: [] }
1616
}).$mount()
1717
cb()
1818
})
@@ -63,8 +63,7 @@ describe('BetterInputTag.vue', () => {
6363

6464
describe('read-only="true"', () => {
6565
const BetterInputTagComponentReadOnly = new ClonedComponent({
66-
data () { return { tags: [] } },
67-
propsData: { readOnly: true }
66+
propsData: { tags: [], readOnly: true }
6867
}).$mount()
6968

7069
it('should have a read-only CSS class and shouldn\'t have a remove tag button', () => {
@@ -93,7 +92,7 @@ describe('BetterInputTag.vue', () => {
9392

9493
describe('tags="[1,2,3]"', () => {
9594
const BetterInputTagComponentWithTags = new ClonedComponent({
96-
data () { return { tags: ['Jerry', 'Kramer', 'Elaine'] } }
95+
propsData: { tags: ['Jerry', 'Kramer', 'Elaine'] }
9796
}).$mount()
9897

9998
it('should load the tags', () => {
@@ -115,7 +114,7 @@ describe('BetterInputTag.vue', () => {
115114
describe('placeholder="Add Tag"', () => {
116115
const placeholder = 'Add Tag'
117116
const BetterInputTagComponentWithPlaceholder = new ClonedComponent({
118-
data () { return { placeholder } }
117+
propsData: { placeholder }
119118
}).$mount()
120119

121120
it('should have a placeholder', () => {

0 commit comments

Comments
 (0)