Created
March 27, 2017 22:44
-
-
Save matrunchyk/31f910a35a2d149305af72c7aa113be2 to your computer and use it in GitHub Desktop.
Laravel + VueJS + Karma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is specified to load ing karma.conf.js (Files section) | |
// @see https://gist.github.com/matrunchyk/a79accea739f586074e005e0542200ea | |
// | |
// Polyfill fn.bind() for PhantomJS | |
/* eslint-disable no-extend-native */ | |
// Function.prototype.bind = require('function-bind'); | |
require('babel-polyfill'); | |
// require all test files (files that ends with .spec.js) | |
const testsContext = require.context('./specs', true, /\.spec$/); | |
testsContext.keys().forEach(testsContext); | |
// require all example files except main.js for COVERAGE ONLY. | |
// you can also change this to match only the subset of files that | |
// you want coverage for. | |
const srcContext = require.context('/path/to/your/src/', true, /^\.\/(?!main(\.js)?$)/); | |
srcContext.keys().forEach(srcContext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment