italktothewind
italktothewind

Reputation: 2195

Use a js file inside karate-config.js

I have a basic-auth.js file with a function auth().

I want to use that function inside karate-config.js, which is the best way? Is it using karate.call?

Thanks!

Upvotes: 2

Views: 835

Answers (1)

Peter Thomas
Peter Thomas

Reputation: 58078

Try:

var fun = read('basic-auth.js');
var res = fun();

Upvotes: 4

Related Questions