Skip to content

Commit 61b5ba2

Browse files
committed
Run QUnit tests using karma runner
This includes: - installing jquery and qunit using npm instead of using versions checked in the repository. Modern version of libraries are used instead of outdated version from the repo. - tests are updated to QUnit 2 (to use async instead of start/stop) - qunit.parameterize is not compatible with qunit 2, therefore it was dropped. Test cases (used in a single test module only) are enumerate in a loop instead. - custom homebrew test runner is dropped - requirejs, only used for tests, is no longer used, karma config specifies dependencies for tests to run. - qunit tests are run as part of npm test. Bash build script is removed.
1 parent 54d072b commit 61b5ba2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+118
-16572
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
lib/jquery/**
2-
lib/qunit/**
3-
lib/qunit.parameterize/**
4-
lib/require/**
51
node_modules/**
62
vendor/**

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@ language: php
33
php:
44
- 5.5
55

6-
env:
7-
- RUNJOB=eslint
8-
- RUNJOB=qunit
9-
106
before_script:
117
- nvm install 4
128
- npm install
139

1410
script:
1511
- npm test
16-
- bash ./build/travis/script.sh
1712

1813
notifications:
1914
irc:

build/travis/script.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

config.js

Lines changed: 0 additions & 230 deletions
This file was deleted.

karma.conf.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module.exports = function ( config ) {
2+
config.set( {
3+
frameworks: [ 'qunit' ],
4+
5+
files: [
6+
'node_modules/jquery/dist/jquery.js',
7+
'lib/util/util.inherit.js',
8+
'lib/globeCoordinate/globeCoordinate.js',
9+
'lib/globeCoordinate/globeCoordinate.GlobeCoordinate.js',
10+
'lib/globeCoordinate/globeCoordinate.Formatter.js',
11+
'src/dataValues.js',
12+
'src/DataValue.js',
13+
'src/values/*.js',
14+
'src/valueFormatters/valueFormatters.js',
15+
'src/valueFormatters/formatters/ValueFormatter.js',
16+
'src/valueFormatters/formatters/*.js',
17+
'src/valueParsers/valueParsers.js',
18+
'src/valueParsers/ValueParserStore.js',
19+
'src/valueParsers/parsers/ValueParser.js',
20+
'src/valueParsers/parsers/*.js',
21+
'tests/lib/globeCoordinate/*.js',
22+
'tests/src/dataValues.tests.js',
23+
'tests/src/dataValues.DataValue.tests.js',
24+
'tests/src/values/*.js',
25+
'tests/src/valueFormatters/valueFormatters.tests.js',
26+
'tests/src/valueFormatters/formatters/*.js',
27+
'tests/src/valueParsers/valueParsers.tests.js',
28+
'tests/src/valueParsers/ValueParserStore.tests.js',
29+
'tests/src/valueParsers/parsers/*.js'
30+
],
31+
32+
port: 9876,
33+
34+
logLevel: config.LOG_INFO,
35+
browsers: [ 'PhantomJS' ]
36+
} );
37+
};

0 commit comments

Comments
 (0)