npm.io
13.7.0 • Published 1 year ago

@talend/scripts-config-karma

Licence
Apache-2.0
Version
13.7.0
Deps
12
Size
8 kB
Vulns
0
Weekly
0

Karma config customisation

To run angular tests via karma, you need to create a spec.bundle.js in your project root. It must include everything that Karma needs to load to run your tests.

Example

import '@babel/polyfill';

// load the app files
import './src/app';

import 'angular-mocks';

// load tests files
const context = require.context('./src', true, /\.spec\.js/);
context.keys().forEach(context);