Skip to content

Commit

Permalink
Merge 3b4baf4 into 094c96e
Browse files Browse the repository at this point in the history
  • Loading branch information
iNeoO committed Feb 12, 2020
2 parents 094c96e + 3b4baf4 commit 4b07b52
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = {
'import/no-extraneous-dependencies': 0,
'class-methods-use-this': 0,
'import/no-named-as-default': 0,
'no-shadow': ['error', {'allow': ['state'] }],
'no-unused-expressions': ['error', {'allowTernary': true }],
'no-shadow': ['error', { allow: ['state'] }],
'no-unused-expressions': ['error', { allowTernary: true }],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
Expand Down
21 changes: 17 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ node_js:
cache:
directories:
- node_modules
script:
- npm run test:unit
after_script:
- cat ./coverage/lcov.info | coveralls
stages:
- lint
- test
- build
jobs:
include:
- stage: lint
script:
- npm run lint
- stage: test
script:
- npm run test:unit
- cat ./coverage/lcov.info | coveralls
- stage: build
script:
- npm run build:lib
- npm run build:doc
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ npm run dev

### Compiles and hot-reloads for development doc
```
npm run dev
npm run doc
```

### Compiles and minifies for production the lib
Expand Down
2 changes: 1 addition & 1 deletion src/components/MeetingSelector/Meetings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class DayDisplay extends Vue {
@Prop({ default: '' })
readonly meetingEmptyClass!: string;
meetingSlotClick(meetingSlot: MeetingsDay): void {
meetingSlotClick(meetingSlot: MeetingSlot): void {
this.$emit('meeting-slot-click', meetingSlot);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/MeetingSelector/VueMeetingSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ import defaultClassNames from '@/defaults/classNames';
},
})
export default class VueMeetingSelector extends Vue {
private skip = 0
skip = 0
@Model('change', { type: Object })
meetingSlot!: MeetingSlot | undefined
Expand Down Expand Up @@ -233,7 +233,7 @@ export default class VueMeetingSelector extends Vue {
this.$emit('next-date');
}
meetingSlotClick(meetingSlot: MeetingsDay): void {
meetingSlotClick(meetingSlot: MeetingSlot): void {
if (this.meetingSlot) {
const selectedDate = new Date(meetingSlot.date);
const date = new Date(this.meetingSlot.date);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ describe('Loader.vue', () => {
const wrapper = shallowMount(Loader);
expect(wrapper.findAll('.icon-loader').exists()).toBe(true);
});
})
});
10 changes: 5 additions & 5 deletions tests/unit/meetingsDisplay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('MeetingDisplay.vue', () => {
const hours:string = date.getHours() < 10 ? `0${date.getHours()}` : `${date.getHours()}`;
const minutes:string = date.getMinutes() < 10 ? `0${date.getMinutes()}` : `${date.getMinutes()}`;
const time:string = `${hours}:${minutes}`;
expect((wrapper.vm as Vue & { time: () => string }).time).toBe(time);
expect((wrapper.vm as Vue & { time: string }).time).toBe(time);
});

it('time > 10', () => {
Expand All @@ -57,7 +57,7 @@ describe('MeetingDisplay.vue', () => {
const hours: string = date.getHours() < 10 ? `0${date.getHours()}` : `${date.getHours()}`;
const minutes: string = date.getMinutes() < 10 ? `0${date.getMinutes()}` : `${date.getMinutes()}`;
const time: string = `${hours}:${minutes}`;
expect((wrapper.vm as Vue & { time: () => string }).time).toBe(time);
expect((wrapper.vm as Vue & { time: string }).time).toBe(time);
});

it('isMeetingSelected, true', () => {
Expand All @@ -70,7 +70,7 @@ describe('MeetingDisplay.vue', () => {
meetingSlotSelected: meetingSlot,
},
});
expect((wrapper.vm as Vue & { isMeetingSelected: () => boolean })
expect((wrapper.vm as Vue & { isMeetingSelected: boolean })
.isMeetingSelected).toBe(true);
});

Expand All @@ -83,7 +83,7 @@ describe('MeetingDisplay.vue', () => {
meetingSlot,
},
});
expect((wrapper.vm as Vue & { isMeetingSelected: () => boolean })
expect((wrapper.vm as Vue & { isMeetingSelected: boolean })
.isMeetingSelected).toBe(false);
});
it('isMeetingSelected no meeting null, false', () => {
Expand All @@ -96,7 +96,7 @@ describe('MeetingDisplay.vue', () => {
meetingSlotSelected: null,
},
});
expect((wrapper.vm as Vue & { isMeetingSelected: () => boolean })
expect((wrapper.vm as Vue & { isMeetingSelected: boolean })
.isMeetingSelected).toBe(false);
});
});
Expand Down

0 comments on commit 4b07b52

Please sign in to comment.