You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bilby91 all expectations are done in ExpectedMesage.ts. We also know the expectations that are going to be run (just based off the current ones).
All we need to do is encapsulate the current expectation calls in some other class or function that picks the correct framework. This part is rather clear.
The less clear part is how to register which framework to use.
Good. I like the idea. So, we are going to support different frameworks in a static way then. We will need to push code in order to support new frameworks right?
What do you think about a global property that defines de framework?
I think that's not bad. Following something like karma's approach would be decent. Globals in a config file and or env variables. It would also help with #10
Any chance you can look at Ava's assertion library?
Whilst currently it's possible to use Ava and rely on Chai by telling Ava to not fail in the absence of it's own assertions it means we get huge Chai stack traces and means we can't use test planning.
@benswinburne It shouldn't be hard to add it. I think that beside of obviously adding the AvaExpectation class we need to remove the hard dependencies plus make conditional importing. Something that we had in the past and then was removed (I think).
@bilby91@benswinburne I've extended the library to be able to toggle between assertion libraries based on config or options. It's currently on the dev branch.
I've opened up a new ticket specifically for the ava task. I can take it on, though I'd be happy to accept work from either of you or reviews of what I submit.
Activity
bilby91 commentedon Aug 30, 2017
@microsoftly Any ideas on how to implement this ? For example, we are using
jest. The syntax is some how different from chai.I was thinking of being able to pass the function to do the expectation but I'm not sure if that can work.
microsoftly commentedon Aug 30, 2017
@bilby91 all expectations are done in ExpectedMesage.ts. We also know the expectations that are going to be run (just based off the current ones).
All we need to do is encapsulate the current expectation calls in some other class or function that picks the correct framework. This part is rather clear.
The less clear part is how to register which framework to use.
bilby91 commentedon Aug 30, 2017
Good. I like the idea. So, we are going to support different frameworks in a static way then. We will need to push code in order to support new frameworks right?
What do you think about a global property that defines de framework?
microsoftly commentedon Aug 30, 2017
I think that's not bad. Following something like karma's approach would be decent. Globals in a config file and or env variables. It would also help with #10
bilby91 commentedon Aug 30, 2017
Good. I will implement this in the next days. Will add jest as the second test framework :)
benswinburne commentedon Jan 23, 2018
Hi,
Any chance you can look at Ava's assertion library?
Whilst currently it's possible to use Ava and rely on Chai by telling Ava to not fail in the absence of it's own assertions it means we get huge Chai stack traces and means we can't use test planning.
bilby91 commentedon Jan 23, 2018
@benswinburne It shouldn't be hard to add it. I think that beside of obviously adding the AvaExpectation class we need to remove the hard dependencies plus make conditional importing. Something that we had in the past and then was removed (I think).
microsoftly commentedon Jan 25, 2018
@bilby91 @benswinburne I've extended the library to be able to toggle between assertion libraries based on config or options. It's currently on the dev branch.
I've opened up a new ticket specifically for the ava task. I can take it on, though I'd be happy to accept work from either of you or reviews of what I submit.
bilby91 commentedon Jan 25, 2018
Can you point into the commit that does the change @microsoftly ?
microsoftly commentedon Jan 25, 2018
@bilby91 0a050c7
I tested locally to ensure the config/options would switch frameworks. I'm not going to commit anything until I have an implementation in place.
microsoftly commentedon Feb 1, 2018
@benswinburne @bilby91 ava support added, see #60
(it's a bit of a hack, but it allows users to run with ava)