Skip to content

Commit

Permalink
Include karma-es6-shim to fix problemes in phantom with array find fu…
Browse files Browse the repository at this point in the history
…nction. Configure karma file to use es6-shim
  • Loading branch information
borjamaza committed Dec 8, 2016
1 parent 289f574 commit 369312f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var webpackConfig = require('./webpack.config');
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai', 'sinon-chai'],
frameworks: ['mocha', 'chai', 'sinon-chai', 'es6-shim'],
files: [
'./test/test_index.js',
'./node_modules/phantomjs-polyfill-object-assign/object-assign-polyfill.js',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-es6-shim": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.1",
"karma-phantomjs-launcher": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/rest-api/spec/training.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { TrainingEntity } from '../../model/training';
import { Student } from '../../model/student';
import { Trainer } from '../../model/trainer';
import {TrainingSummary} from '../../model/trainingSummary';
import { trainingApi } from '../training'
import { trainingApi } from '../training';
import {} from 'es6-promise';

let trainingList : TrainingEntity[];

Expand Down Expand Up @@ -91,7 +92,6 @@ describe('TrainingApi', () => {
// Act
expectedTraining = trainingList.find(training => training.id === id);


const fetchTraining = trainingApi.getTrainingById(id);

fetchTraining.then((training) => {
Expand Down

0 comments on commit 369312f

Please sign in to comment.