Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark test case as async to exclude sync methods from being tested #38

Open
gijswijs opened this issue Apr 4, 2019 · 3 comments · May be fixed by #50
Open

Mark test case as async to exclude sync methods from being tested #38

gijswijs opened this issue Apr 4, 2019 · 3 comments · May be fixed by #50

Comments

@gijswijs
Copy link

gijswijs commented Apr 4, 2019

Maybe I'm missing something here, but I'm extending the nunjucks transformer to be able to handle async rendering as well. For this I added a renderAsync method that handles this.
I also added a test case that mimics an async template loader.
This test case (obviously) fails with the sync methods, as it should. But there's no way to exclude the methods from being tested on the async test case.
The other way around (testing the async method on sync test cases) isn't a problem, since the renderAsync handles them perfectly.

@RobLoach
Copy link
Member

RobLoach commented Apr 5, 2019

Yes, I've been troubled by this myself. We're open to switching test cases!

@gijswijs
Copy link
Author

gijswijs commented Apr 9, 2019

I'll see what I can do. I'm not making any promises yet, as I'm busy these days.

@gijswijs gijswijs linked a pull request May 28, 2020 that will close this issue
@gijswijs
Copy link
Author

See @RobLoach it only took me a year! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants