Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const _ = require('lodash')
const babelConfig = JSON.parse(
require('fs').readFileSync(`${__dirname}/../.babelrc`)
)
/**
* Headless Chrome setup
*/
const ChromiumRevision = require('puppeteer/package.json').puppeteer
.chromium_revision
const Downloader = require('puppeteer/utils/ChromiumDownloader')
const revisionInfo = Downloader.revisionInfo(
Downloader.currentPlatform(),
ChromiumRevision
)
process.env.CHROMIUM_BIN = revisionInfo.executablePath
/**
* Karma config
*/
module.exports = function(config) {
config.set({
// browsers: ['ChromiumHeadless'],
browsers: ['Chrome'],
frameworks: ['mocha'],
import puppeteerPkg from 'puppeteer/package.json'
import Downloader from 'puppeteer/utils/ChromiumDownloader'
import config from './config'
import webpackConfig from './webpack.config.babel'
const revision = puppeteerPkg.puppeteer.chromium_revision
const revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), revision)
process.env.CHROME_BIN = revisionInfo.executablePath
const formatError = (msg) => {
// filter out empty lines and node_modules
if (!msg.trim() || /~/.test(msg)) return ''
// indent the error beneath the it() message
let newLine = ` ${msg}`
if (newLine.includes('webpack:///')) {
// remove webpack:///
newLine = newLine.replace('webpack:///', '')
// remove bundle location, showing only the source location
newLine = newLine.slice(0, newLine.indexOf(' <- '))
'use strict';
const TestServer = require('karma').Server;
const _ = require('underscore');
const path = require('path');
const Promise = require('bluebird');
const fs = require('fs');
const colors = require('colors');
const readDir = Promise.promisify(fs.readdir);
const writeFile = Promise.promisify(fs.writeFile);
const ChromiumRevision = require('puppeteer/package.json').puppeteer.chromium_revision;
const Downloader = require('puppeteer/utils/ChromiumDownloader');
const revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), ChromiumRevision);
process.env.CHROME_BIN = revisionInfo.executablePath;
const filesToSkip = [
'CoveoJsSearch.Lazy.js',
'CoveoJsSearch.Dependencies.js',
'CoveoJsSearch.js',
'Checkbox.js',
'DatePicker.js',
'Dropdown.js',
'FormGroup.js',
'MultiSelect.js',
'NumericSpinner.js',
'RadioButton.js',
'TextInput.js'
];
const ChromiumRevision = require('puppeteer/package.json').puppeteer.chromium_revision;
const Downloader = require('puppeteer/utils/ChromiumDownloader');
const revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), ChromiumRevision);
process.env.CHROME_BIN = revisionInfo.executablePath;
var configuration = {
singleRun: true,
browsers: ['ChromeHeadless'],
frameworks: ['jasmine'],
browserNoActivityTimeout: 90000,
browserDisconnectTolerance: 10,
files: [
{
pattern: './node_modules/es6-promise/dist/es6-promise.auto.js',
watched: false
},
{
pattern: './test/lib/jasmine-ajax/jasmine-ajax.js',
/** Created by CUIJA on 05-05-2017.*/
import webpackTestConf from './webpack.test.config.babel';
import puppeteerPkg from 'puppeteer/package.json';
import Downloader from 'puppeteer/utils/ChromiumDownloader';
import pathUtil from '../util/path-util';
const ChromiumRevision = puppeteerPkg['puppeteer']['chromium_revision'];
let revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), ChromiumRevision);
process.env.CHROMIUM_BIN = revisionInfo.executablePath;
let karmaConfig = function(config) {
config.set({
browsers: [
'ChromiumHeadless'
],
frameworks: [
'mocha',
'chai',
'sinon'
],
files: [
pathUtil.resolve('test/unit/specs') + '/**/*.spec.js'
],
reporters: [