Typescript pageObject model - importing an extended class's imports?

45 views Asked by At

I have a 'base' page.ts file with these imports

import { expect as expectChai } from 'chai';

import { expect as expectWdio } from '@wdio/globals'

and export this like

export default class Page

I have a pageObject page called homePage.ts and extend like

export class homePage extends Page

Question: how can I access expectChai and expectWdio on the homePage.ts without importing these again. There will be many pageObject pages, if I have to import each time it seems redundant.

I couldnt figure out a way of doing this after a some searching

0

There are 0 answers