pactumjs / pactum

REST API Testing Tool for all levels in a Test Pyramid
https://pactumjs.github.io
MIT License
538 stars 52 forks source link

spec().stores() may support a custom function #274

Closed wine-fall closed 1 year ago

wine-fall commented 1 year ago
wine-fall commented 1 year ago

By the way, to be honest, there are lots of types of pactum is so confusing. eg:

withHeaders(headers: object): Spec;

something like this may be better:

withHeaders<T>(headers: T): Spec;
ASaiAnudeep commented 1 year ago

You can create a different issue to track the type definition changes.

wine-fall commented 1 year ago

hi @ASaiAnudeep:

thanks for merging my code! I just update the doc and types of stores, please check.

As for the optimization of other types, I think translating the whole things to typescript is a better choice. And if you'd like to do it in future, I'm happy to join it.

Anyway, I will update some types of pactumjs when I using it and create another issue to track it.