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
I was trying to find an issue that is tracking support for setup and teardown methods, but couldn't find anything thus far. Any particular reason those two methods aren't supported? Any chance they would be on a roadmap for plenary?
My use case is that I have a series of end-to-end tests that have really expensive setup costs. Today, I'm performing the same setup and teardown for each of my individual it(...) tests, which involves communicating over a network and creating a directory structure. My fixtures don't change, but I do need them to be dynamically generated within my tests.
As a result, this slows down my tests by a lot. Here's what I've got today in case there's a better way to stand up my driver that performs network calls and tear it down once all tests have finished for the given describe block:
localdriver, rootbefore_each(function()
driver=Driver:setup()
-- TODO: This is really expensive, but plenary doesn't offer setup/teardown-- functions that we could use to limit this to the the entire-- describe block---- Because we don't know when the last it(...) would finish, we cannot-- support manually creating a fixture and unloading it as it would-- get unloaded while other it blocks are still using itroot=driver:new_dir_fixture({items= {
'dir1/',
'dir1/dir1-file1',
'dir1/dir1-file2',
'dir1/sub1/',
'dir1/sub1/dir1-sub1-file1',
'dir1/sub2/',
'dir2/',
'dir2/dir2-file1',
'dir2/dir2-file2',
'file1',
'file2',
}})
end)
after_each(function()
driver:teardown()
end)
The text was updated successfully, but these errors were encountered:
This is related to how busted works now:
see describe what describe calls and what gets evaluated.
see format_results how simple outputs are generated.
And see the Makefile how they are called (per file).
One would need to make lua test files "known to lua" to build abstractions on that kinda how you define things for packer.nvim with function bodies calling files.
If this should be done as simple as possible:
collect all files in tests in a table to check for completeness of 1.
annotate functions to filenames with how the table should be evaluated (ie order etc)
collect results of 1. for overall output including elapsed time per test
print results (each test file and finally the summary table)
busted is very minimal on top of the language lua and calls each test file individually without any overall testing strategy.
I was trying to find an issue that is tracking support for
setup
andteardown
methods, but couldn't find anything thus far. Any particular reason those two methods aren't supported? Any chance they would be on a roadmap for plenary?My use case is that I have a series of end-to-end tests that have really expensive setup costs. Today, I'm performing the same setup and teardown for each of my individual
it(...)
tests, which involves communicating over a network and creating a directory structure. My fixtures don't change, but I do need them to be dynamically generated within my tests.As a result, this slows down my tests by a lot. Here's what I've got today in case there's a better way to stand up my driver that performs network calls and tear it down once all tests have finished for the given describe block:
The text was updated successfully, but these errors were encountered: