Sha256: 97bddbd3fec4e73c6dfa0b6aff9b054cddfc857f2f8bd0329bbd415949a7ca23

Contents?: true

Size: 802 Bytes

Versions: 15

Compression:

Stored size: 802 Bytes

Contents

import { shallow, mount } from 'enzyme';
import jasmineEnzyme from 'jasmine-enzyme';
import React from 'react';
import 'jasmine-ajax';

Object.assign(global, {
  jasmineEnzyme,
  mount,
  React,
  shallow,
});

beforeEach(() => {
  jasmineEnzyme();
});

// function to require all modules for a given context
let requireAll = requireContext => {
  requireContext.keys().forEach(requireContext);
};

// require all js files except testHelper.js in the test folder
requireAll(require.context('./', true, /^((?!testHelper).)*\.jsx?$/));

// require all js files except main.js in the src folder
requireAll(require.context('../../app/javascript', true, /^((?!application).)*\.jsx?$/));

// output to the browser's console when the tests run
console.info(`TESTS RAN AT ${new Date().toLocaleTimeString()}`);

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
make_it_so-0.4.3 templates/rails/spec/javascript/testHelper.js
make_it_so-0.4.2 templates/rails/spec/javascript/testHelper.js
make_it_so-0.4.1 templates/rails/spec/javascript/testHelper.js
make_it_so-0.4.0 templates/rails/spec/javascript/testHelper.js
make_it_so-0.3.8 templates/rails/spec/javascript/testHelper.js
make_it_so-0.3.7 templates/rails/spec/javascript/testHelper.js
make_it_so-0.3.6 templates/rails/spec/javascript/testHelper.js
make_it_so-0.3.5 templates/rails/spec/javascript/testHelper.js
make_it_so-0.3.4 templates/rails/spec/javascript/testHelper.js
make_it_so-0.2.4 templates/rails/spec/javascript/testHelper.js
make_it_so-0.2.3 templates/rails/spec/javascript/testHelper.js
make_it_so-0.1.4 templates/rails/spec/javascript/testHelper.js
make_it_so-0.1.3 templates/rails/spec/javascript/testHelper.js
make_it_so-0.1.1 templates/rails/spec/javascript/testHelper.js
make_it_so-0.1.0 templates/rails/spec/javascript/testHelper.js