Skip to content
This repository was archived by the owner on Dec 15, 2020. It is now read-only.

Commit a267be7

Browse files
committed
Run QUnit tests using Karma runner
This includes several changes: - custom home-brew test runner is removed in favour of using Karma runner. - more modern versions of jquery and qunit are used, and installed using npm, instead of including copies of libs in the git repo. jquery is only used to have access to $.extend, and it also works in jquery 3 without changes to our code! - QUnit-parameterize has no public version (neither official npm package neither custom in-house fork used so far) that works with QUnit 2, so it has been dropped too. Changes to tests are not significant due to small size of the library. All previously tested behaviour is still tested. - 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 9c6a237 commit a267be7

File tree

18 files changed

+98
-3097
lines changed

18 files changed

+98
-3097
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.travis.yml export-ignore
77
build export-ignore
88
composer.json export-ignore
9+
karma.conf.js export-ignore
910
phpcs.xml export-ignore
1011
phpunit.xml.dist export-ignore
1112
tests export-ignore

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: php
22

33
env:
4-
- QUNIT=false
4+
- JS_BUILD=false
55

66
dist: trusty
77

@@ -14,16 +14,15 @@ php:
1414
matrix:
1515
include:
1616
- php: 5.5
17-
env: QUNIT=true
17+
env: JS_BUILD=true
1818

1919
before_script:
2020
- composer install --prefer-source
21-
- npm install
21+
- if [[ "$JS_BUILD" == true ]]; then npm install; fi
2222

2323
script:
2424
- composer test
25-
- npm test
26-
- bash ./build/travis/script.sh
25+
- if [[ "$JS_BUILD" == true ]]; then npm test; fi
2726

2827
notifications:
2928
email:

build/travis/script.sh

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

js/config.js

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

js/lib/TestRunner/TestRunner.js

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

js/lib/TestRunner/TestRunner.phantom.js

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

js/lib/TestRunner/runTests.phantom.js

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

js/lib/jquery/jquery.js

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

js/lib/qunit.parameterize/LICENCE

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

0 commit comments

Comments
 (0)