Lets say 'mywebsite.com' has a global function:
function sayHello(message){
console.log(message)
}
is it possible to run a test of that function with testcafé in nodejs?
So far i have this
import { Selector } from 'testcafe';
fixture `mywebsite test`
.page `http://mywebsite.com`;
test('sayHelloFuncTest', async t => {
sayHello('HELLO!')
});
This will give me an error saying: ReferenceError: sayHello is not defined
So is there a way to access the sayHello() function?
Aucun commentaire:
Enregistrer un commentaire