How to use the @open-wc/testing-helpers/fixtureWrapper.js.cachedWrappers.length function in @open-wc/testing-helpers

To help you get started, we’ve selected a few @open-wc/testing-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github open-wc / open-wc / packages / testing / register-fixture-cleanup.js View on Github external
afterEach(() => {
    if (cachedWrappers) {
      cachedWrappers.forEach(wrapper => {
        document.body.removeChild(wrapper);
      });
    }
    cachedWrappers.length = 0; // reset it like this as we can't reassign it
  });
}