Commit 4087395d authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

First attempt at getting CI up and running

parent bf75a678
Pipeline #1795 failed with stage
in 1 minute and 17 seconds
image: node:latest
cache:
paths:
- node_modules/
before_script:
- npm install
test:
script:
- npm test
\ No newline at end of file
......@@ -6,13 +6,15 @@ module.exports = config => {
files: [
{pattern: 'test/**/*_test.js'}
],
browsers: ['Chrome'],
browsers: ['PhantomJS'],
preprocessors: {
'test/**/*_test.js': ['webpack', 'sourcemap']
},
webpack: webpackConfig,
webpackMiddleware: {
stats: 'errors-only'
}
},
singleRun: true,
colors: true
})
}
......@@ -5,7 +5,8 @@
"author": "Sascha Herzinger",
"private": true,
"scripts": {
"build": "webpack --config webpack.config.js"
"build": "./node_modules/webpack/bin/webpack.js --config webpack.config.js",
"test": "./node_modules/karma/bin/karma start karma.config.js"
},
"dependencies": {
"vue": "^2.2.4",
......@@ -30,6 +31,7 @@
"jasmine-core": "^2.5.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.3",
"karma-jasmine": "^1.1.0"
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.4"
}
}
\ No newline at end of file
import ReqestHandler from '../src/services/requests'
describe('RequestHandler', () => {
it('throws if invalid constructor arguments 1', () => {
const params = {
handler: 'foo',
thisBaseURL: 'http://localhost:5000',
thisAuth: {token: '1234567890'},
fractalisBaseURL: 'http://fractalis.uni.lu'
}
expect(() => new ReqestHandler(params)).toThrowError()
})
})
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment