New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre release clean up #7
Conversation
src/vue-rut.spec.js
Outdated
it('should format value', () => { | ||
vm = new Vue({ | ||
template: '<div>{{superRut | rut}}</div>', | ||
data: () => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Vue.filter('rut', rutFilter); | ||
}); | ||
|
||
it('should format value', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
|
||
describe('Rut Filter', () => { | ||
let vm; | ||
beforeEach(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
}); | ||
|
||
describe('Rut Filter', () => { | ||
let vm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}); | ||
}); | ||
|
||
describe('Rut Filter', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
template: '<div><input v-rut:live name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
expect(nativeInput.value).toBe('7.618.285-K'); | ||
}); | ||
|
||
it('should always format on blur even if in live mode', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
template: '<div><input v-rut:live name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
expect(nativeInput.value).toBe('7618285K'); | ||
}); | ||
|
||
it('should format on keyup if in live mode', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
template: '<div><input v-rut name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bakan!, lo mergeo....
te hice un mini comentario....
src/vue-rut.spec.js
Outdated
it('should format value', () => { | ||
vm = new Vue({ | ||
template: '<div>{{superRut | rut}}</div>', | ||
data: () => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aqui el data creo que tiene sentido usar las funciones cortas en vez de arrow funcion, porque dentro de la funcion en data
creo que uno prefiere que el this
sea la instancia de Vue
Yo se que en este caso no estas usando this, pero como por acostumbrarse...
vm = new Vue({
template: '<div>{{superRut | rut}}</div>',
data() {
superRut: '7618285K',
}),
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toda la razón, lo voy a actualizar.
it('should format value', () => { | ||
vm = new Vue({ | ||
template: '<div>{{superRut | rut}}</div>', | ||
data() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'concise methods' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
template: '<div><input v-rut:live name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
template: '<div><input v-rut name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
aparte de que obedientemente lo cambiaste me encataria saber tu opinion... :) |
template: '<div><input v-rut:live name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
template: '<div><input v-rut name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
template: '<div><input v-rut:live name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
template: '<div><input v-rut name="rut" type="text"></div>', | ||
}).$mount(); | ||
|
||
const nativeInput = vm.$el.querySelector('input'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
No description provided.