Skip to content

Commit aceeaee

Browse files
authored
chore: refactor all JS specs to TS (#92)
* chore: refactor all JS specs to TS * deps: update cypress to v6.3.0
1 parent 1250883 commit aceeaee

35 files changed

+256
-291
lines changed
File renamed without changes.
File renamed without changes.

cypress/integration/functional/content-width.spec.js renamed to cypress/integration/functional/content-width.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
/// <reference types="cypress" />
22

3-
function toBeDifferentWidth(select) {
3+
function toBeDifferentWidth(select: string) {
44
cy.get(`${select} .v-hl-container > :nth-child(1)`)
55
.invoke('outerWidth')
66
.then(lhs => {
77
cy.get(`${select} .v-hl-container > :nth-child(2)`)
88
.invoke('outerWidth')
9-
.then(rhs => {
10-
expect(lhs).to.be.not.closeTo(rhs, 1);
9+
.then((rhs: any) => {
10+
expect(lhs).to.be.not.closeTo(rhs as number, 1);
1111
})
12-
1312
})
1413
}
1514

File renamed without changes.
File renamed without changes.

cypress/integration/functional/fixed-width.spec.js renamed to cypress/integration/functional/fixed-width.spec.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
/// <reference types="cypress" />
22

3-
function beSameWidth(select) {
3+
function beSameWidth(select: string) {
44
cy.get(`${select} .v-hl-container > :nth-child(1)`)
55
.invoke('outerWidth')
66
.then(lhs => {
77
cy.get(`${select} .v-hl-container > :nth-child(2)`)
88
.invoke('outerWidth')
9-
.then(rhs => {
9+
.then((rhs: any) => {
1010
expect(lhs).to.be.closeTo(rhs, 0.5);
1111
})
12-
1312
})
1413
}
1514

@@ -20,19 +19,19 @@ describe('fixed-width', () => {
2019
})
2120

2221
it('should be all same width', function () {
23-
for (const i of [1,2]) {
22+
for (const i of [1, 2]) {
2423
cy.get(`.20-items .v-hl-container > :nth-child(${i})`)
2524
.invoke('outerWidth')
2625
.then(lhs => {
2726
cy.get(`.2-items .v-hl-container > :nth-child(${i})`)
2827
.invoke('outerWidth')
29-
.then(rhs => {
28+
.then((rhs: any) => {
3029
expect(lhs).to.be.closeTo(rhs, 0.5);
3130
})
3231

3332
cy.get(`.fixed-content .v-hl-container > :nth-child(${i})`)
3433
.invoke('outerWidth')
35-
.then(rhs => {
34+
.then((rhs: any) => {
3635
expect(lhs).to.be.closeTo(rhs, 0.5);
3736
})
3837
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)