├── .gitignore ├── test └── test.spec.js ├── README.md ├── .travis.yml ├── package.json └── karma.conf.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /test/test.spec.js: -------------------------------------------------------------------------------- 1 | describe("test", function() { 2 | it("should work", function () { 3 | expect(true).toEqual(true); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/kristerkari/travis-chrome.svg?branch=master)](https://travis-ci.org/kristerkari/travis-chrome) 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | dist: trusty 3 | sudo: required 4 | node_js: 5 | - "8" 6 | 7 | before_install: 8 | - export DISPLAY=:99.0 9 | - sh -e /etc/init.d/xvfb start 10 | - sleep 3 # give xvfb some time to start 11 | 12 | addons: 13 | chrome: stable 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "travis-chrome", 3 | "version": "1.0.0", 4 | "description": "Test", 5 | "scripts": { 6 | "test": "karma start" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/kristerkari/travis-chrome.git" 11 | }, 12 | "author": "", 13 | "license": "ISC", 14 | "bugs": { 15 | "url": "https://github.com/kristerkari/travis-chrome/issues" 16 | }, 17 | "homepage": "https://github.com/kristerkari/travis-chrome#readme", 18 | "devDependencies": { 19 | "jasmine-core": "^2.8.0", 20 | "karma": "^2.0.0", 21 | "karma-chrome-launcher": "^2.2.0", 22 | "karma-jasmine": "^1.1.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Thu Apr 14 2016 01:08:35 GMT+0300 (EEST) 3 | 4 | module.exports = function(config) { 5 | var configuration = { 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['jasmine'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'test/*.js' 19 | ], 20 | 21 | 22 | // list of files to exclude 23 | exclude: [ 24 | ], 25 | 26 | 27 | // preprocess matching files before serving them to the browser 28 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 29 | preprocessors: { 30 | }, 31 | 32 | 33 | // test results reporter to use 34 | // possible values: 'dots', 'progress' 35 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 36 | reporters: ['progress'], 37 | 38 | 39 | // web server port 40 | port: 9876, 41 | 42 | 43 | // enable / disable colors in the output (reporters and logs) 44 | colors: true, 45 | 46 | 47 | // level of logging 48 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 49 | logLevel: config.LOG_INFO, 50 | 51 | 52 | // enable / disable watching file and executing tests whenever any file changes 53 | autoWatch: false, 54 | 55 | 56 | // start these browsers 57 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 58 | browsers: ['Chrome'], 59 | 60 | customLaunchers: { 61 | Chrome_travis_ci: { 62 | base: 'Chrome', 63 | flags: ['--no-sandbox'] 64 | } 65 | }, 66 | 67 | // Continuous Integration mode 68 | // if true, Karma captures browsers, runs the tests and exits 69 | singleRun: true, 70 | 71 | // Concurrency level 72 | // how many browser should be started simultaneous 73 | concurrency: Infinity 74 | }; 75 | 76 | if(process.env.TRAVIS) { 77 | configuration.browsers = ['Chrome_travis_ci']; 78 | } 79 | 80 | config.set(configuration); 81 | 82 | } 83 | --------------------------------------------------------------------------------