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
Currently, to reset the test environment between test cases, it's necessary to initialize a new test fixture, which is inefficient in that it must completely reload the validation function from disk. Furthermore, it can lead to the code editor being unable to autocomplete the test fixture object's properties if the variable's initialization is done in a beforeEach block. Add a function to the test fixture object that can be used to reset the test environment to a pristine state.
Examples
describe('My new validation function', () => {
const testFixture = testFixtureMaker.initFromDocumentDefinitions('/path/to/my-doc-definitions.js');
afterEach(() => {
testFixture.resetTestEnvironment();
});
// Test cases...
});
The text was updated successfully, but these errors were encountered:
Feature Request
Description
Currently, to reset the test environment between test cases, it's necessary to initialize a new test fixture, which is inefficient in that it must completely reload the validation function from disk. Furthermore, it can lead to the code editor being unable to autocomplete the test fixture object's properties if the variable's initialization is done in a
beforeEach
block. Add a function to the test fixture object that can be used to reset the test environment to a pristine state.Examples
The text was updated successfully, but these errors were encountered: