How to use the babel-helper-fixtures.multiple 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 / test / helpers / runFixtureTests.js View on Github external
export function runThrowTestsWithEstree(fixturesPath, parseFunction) {
  const fixtures = getFixtures(fixturesPath);

  Object.keys(fixtures).forEach(function(name) {
    fixtures[name].forEach(function(testSuite) {
      testSuite.tests.forEach(function(task) {
        if (!task.options.throws) return;

        task.options.plugins = task.options.plugins || [];
        task.options.plugins.push("estree");

        const testFn = task.disabled
          ? test.skip
          : task.options.only ? test.only : test;

        testFn(name + "/" + testSuite.title + "/" + task.title, function(t) {
          try {
            runTest(task, parseFunction);
github babel / babel / test / helpers / runFixtureTests.js View on Github external
export function runFixtureTests(fixturesPath, parseFunction) {
  const fixtures = getFixtures(fixturesPath);

  Object.keys(fixtures).forEach(function(name) {
    fixtures[name].forEach(function(testSuite) {
      testSuite.tests.forEach(function(task) {
        const testFn = task.disabled
          ? test.skip
          : task.options.only ? test.only : test;

        testFn(name + "/" + testSuite.title + "/" + task.title, function(t) {
          try {
            runTest(task, parseFunction);
            t.pass();
          } catch (err) {
            const message =
              name + "/" + task.actual.filename + ": " + err.message;
            t.fail(message);

babel-helper-fixtures

Helper function to support fixtures

MIT
Latest version published 6 years ago

Package Health Score

73 / 100
Full package analysis

Popular babel-helper-fixtures functions

Similar packages