Data providers for test cases

53 views
Skip to first unread message

chandrasekar arunachalam

unread,
Dec 2, 2018, 1:55:45 PM12/2/18
to Jasmine
How about adding data provider for test cases inherently?

Ish Abbi

unread,
Dec 11, 2018, 11:46:13 AM12/11/18
to Jasmine
There is a workaround where you can add your data set as a JS Array and iterate it over a forEach. As follows :

let dataProvider =["test1","test2","test3"];

describe
(() => {
   dataProvider
.forEach((case) => {
       it
("Tests", () => {
         
//Your tests
       
});
   
});
});

chandrasekar arunachalam

unread,
Dec 25, 2018, 12:09:04 AM12/25/18
to jasmi...@googlegroups.com

Cool, yeah that’s a good way of seeing it, here my intention to ask is, why this kind of approach is not incorporated in jasmine core ?

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jasmine-js+...@googlegroups.com.
To post to this group, send email to jasmi...@googlegroups.com.
Visit this group at https://groups.google.com/group/jasmine-js.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages