Skip to content

Commit

Permalink
refactor(karma.conf.js,package.json): remove testingDeps key and add …
Browse files Browse the repository at this point in the history
…angular-mocks dep
  • Loading branch information
Justin Pumford committed Aug 12, 2016
1 parent 40a25e0 commit 9a75bb1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
8 changes: 1 addition & 7 deletions other/karma.conf.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ module.exports = config => {
// load external cdn dependencies
const pkg = require('../package.json');
const cdns = Object.values(pkg.cdnDependencies);
const testingDeps = Object.values(pkg.testingDependencies);
// add angular mocks
const externalFiles = [
...cdns,
...testingDeps
];

// entry file that bundles all the test files
const testEntryFile = './other/tests.js';
Expand All @@ -18,7 +12,7 @@ module.exports = config => {
config.set({
frameworks: ['mocha', 'chai', 'sinon'],
files: [
...externalFiles,
...cdns,
testEntryFile
],
preprocessors: {
Expand Down
1 change: 1 addition & 0 deletions other/tests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require('angular-mocks/ngMock');
const testFiles = require.context('../src', true, /\.spec\.js$/);
const ngModule = angular.module('da.test', []);
testFiles.keys().forEach(key => { testFiles(key)(ngModule); });
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"@domoinc/da-plop": "^3.0.0",
"angular-mocks": "^1.5.8",
"autoprefixer": "^6.1.2",
"babel-core": "^6.3.17",
"babel-loader": "^6.2.0",
Expand Down Expand Up @@ -102,9 +103,6 @@
"angular-animate": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-animate.min.js",
"angular-ui-router": "https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js"
},
"testingDependencies": {
"angular-mocks": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-mocks.js"
},
"config": {
"AppTeam6": {
"framework": "da-webpack",
Expand Down

0 comments on commit 9a75bb1

Please sign in to comment.