Skip to content

Commit

Permalink
test: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Chastrlove committed Apr 21, 2022
1 parent 4737486 commit 60aa1ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/development/basic/define-class-fields.test.ts
Expand Up @@ -77,7 +77,7 @@ describe('useDefineForClassFields SWC option', () => {
let browser
try {
browser = await webdriver(next.appPort, '/derived')
matchLogs$(browser).then(([data_foundLog, name_foundLog]) => {
await matchLogs$(browser).then(([data_foundLog, name_foundLog]) => {
expect(data_foundLog).toBe(true)
expect(name_foundLog).toBe(false)
})
Expand Down
6 changes: 5 additions & 1 deletion test/development/basic/define-class-fields/pages/animal.tsx
Expand Up @@ -19,19 +19,23 @@ class DogHouse extends AnimalHouse {
// using 'useDefineForClassFields'!
// @ts-ignore
resident: Dog
// useless constructor only for type checker
/* eslint-disable @typescript-eslint/no-useless-constructor */
constructor(dog: Dog) {
super(dog)
}
}

class DogHouseWithDeclare extends AnimalHouse {
declare resident: Dog
// useless constructor only for type checker
/* eslint-disable @typescript-eslint/no-useless-constructor */
constructor(dog: Dog) {
super(dog)
}
}

export default function Animal() {
export default function AnimalView() {
const dog = new DogHouse({
animalStuff: 'animal',
dogStuff: 'dog',
Expand Down

0 comments on commit 60aa1ba

Please sign in to comment.