Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
# Logs
logs
*.log
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: node_js
node_js:
- "node"
- "iojs"
services:
- "xvfb"
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ A suite of JavaScript tests (hopefully) useful for interviews
1. `npm install`
2. `npm test`/`npm watch`
3. Get the candidate to complete the tests and Karma should watch the files and run the tests on save.

## Solved

1. `clone-object` ![alt text](https://raw.githubusercontent.com/styk-tv/javascript-tests/master/screenshots/clone.png?raw=true)
2. `flatten-array` ![alt text](https://raw.githubusercontent.com/styk-tv/javascript-tests/master/screenshots/flatten.png?raw=true)
3. `scoping` ![alt text](https://raw.githubusercontent.com/styk-tv/javascript-tests/master/screenshots/scoping.png?raw=true)
21 changes: 12 additions & 9 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Karma configuration
// Generated on Wed Jun 18 2014 09:33:44 GMT+0100 (BST)
// Generated on Fri Jul 12 2019 17:03:22 GMT+0100 (British Summer Time)

module.exports = function(config) {
var browsers = ['PhantomJS', 'Firefox'];
Expand All @@ -21,20 +21,19 @@ module.exports = function(config) {

// list of files / patterns to load in the browser
files: [
'test/**/*.js'
'./node_modules/phantomjs-polyfill-object-assign/object-assign-polyfill.js',
'test/*.js'
],


// list of files to exclude
// list of files / patterns to exclude
exclude: [

],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {

},


Expand All @@ -54,7 +53,7 @@ module.exports = function(config) {

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
logLevel: config.LOG_DEBUG,


// enable / disable watching file and executing tests whenever any file changes
Expand All @@ -68,6 +67,10 @@ module.exports = function(config) {

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
singleRun: true,

// Concurrency level
// how many browser should be started simultaneous
concurrency: 1
})
}
Loading