How to use the @babel/helper-fixtures function in @babel/helper-fixtures

To help you get started, we’ve selected a few @babel/helper-fixtures 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 babel / babel / packages / babel-helper-transform-fixture-test-runner / src / index.js View on Github external
export default function(
  fixturesLoc: string,
  name: string,
  suiteOpts = {},
  taskOpts = {},
  dynamicOpts?: Function,
) {
  const suites = getFixtures(fixturesLoc);

  for (const testSuite of suites) {
    if (includes(suiteOpts.ignoreSuites, testSuite.title)) continue;

    describe(name + "/" + testSuite.title, function() {
      jest.addMatchers({
        toEqualFile,
      });

      for (const task of testSuite.tests) {
        if (
          includes(suiteOpts.ignoreTasks, task.title) ||
          includes(suiteOpts.ignoreTasks, testSuite.title + "/" + task.title)
        ) {
          continue;
        }

@babel/helper-fixtures

Helper function to support fixtures

MIT
Latest version published 28 days ago

Package Health Score

93 / 100
Full package analysis

Popular @babel/helper-fixtures functions

Similar packages