Spec update parts 1-5 #2736

merged 19 commits into from Oct 1, 2015


None yet

2 participants


As proposed in #2734.

  • part 1: Improvements to three specs I ran into. $$ spec actually turned out to be broken after adding actual elements to select.
  • part 2: A little housekeeping and updating of package.json, server tests and .travis.yml.
  • part 3: First "big" change, removed Tests/Utilities and included syn and sinon packages instead, added Tests/Plugins/syn to use syn in karma. Last commit re-adds a local version of syn (hopefully temporarily).
  • part 4: Update everything to Jasmine to 2.3, major changes: spy API and async API. Instead of using the new Jasmine spy API, I changed these to sinon spies. The new async API is very similar to the mocha async API.
  • part 5: Changed the server specs to be able to test more than just Core/*.js files (which were actually included 5 times)
timwienk added some commits Sep 23, 2015
@timwienk timwienk Specs: Improve specs for $$. 423cea9
@timwienk timwienk Specs: Improve spec for Element.clone. Cloned element can be equal bu…
…t not identical to the original element.
@timwienk timwienk Specs: Make Browser specs pass in Edge. 2bf85ed
@timwienk timwienk package.json: Fix test script "test: !=: unexpected operator" error. 055362f
@timwienk timwienk package.json: Update devDependencies. a145176
@timwienk timwienk .gitignore: Ignore mootools-server.js and mootools-server-specs.js. 3c1fc7e
@timwienk timwienk Tests: Rename jasmine-server-tests to server-tests. dea2023
@timwienk timwienk .travis.yml: Cleanup Travis builds, we don't need the duplicate empty…
… builds.
@timwienk timwienk .travis.yml: Remove before_script downloading Sauce Connect.
karma-sauce-connect uses sauce-connect-launcher to download the
right Sauce Connect.
@timwienk timwienk .travis.yml: Add Node 4, remove iojs. 94b08a5
@timwienk timwienk Gruntfile.js: Add "default:dev" and "nocompat:dev" tasks.
These tasks use the karma:dev config that's already there.
@timwienk timwienk Tests: Remove Utilities/sinon.js and add karma-sinon-ie instead of ka…

IE compatibility was coincindentally inherited from Utilities/sinon.js,
karma-sinon-ie loads the right files from the sinon package to do this
in a reliable way instead.

The "sinon"-package was already installed through karma-sinon's
peerDependancy, now added to package.json as well.
@timwienk timwienk Tests: Replace Tests/Utilities/syn.js with syn package + karma plugin.
Also updated Specs files to work with newer version of syn.
@timwienk timwienk Tests: Remove references to "Tests/Utilities/*.js". e593c85
@timwienk timwienk Tests: Replace Syn with a local version that works in IE9 and IE10.
Apparently triggering a click on an <a href="javascript:somethin()" />
in IE9 and IE10 causes a page reload of which Karma doesn't approve.

Since we don't use this functionality in our tests anyway, preventing
that trigger from happening has no effects for us.

Diff of the change to the original source (before building):

--- a/src/mouse.support.js
+++ b/src/mouse.support.js
@@ -22,7 +22,7 @@ if (!document.body) {
	select = form.getElementsByTagName('select')[0];

	//trigger click for linkHrefJS support, childNodes[6] === anchor
-	syn.trigger(form.childNodes[6], 'click', {});
+	//syn.trigger(form.childNodes[6], 'click', {});

	checkbox.checked = false;
	checkbox.onchange = function () {
@timwienk timwienk Specs: Replace Jasmine spies with Sinon spies. ff685c5
@timwienk timwienk Specs: Update for Jasmine 2.3, and update karma-jasmine.
Even though Jasmine 2.3 has been in the devDependencies, the version of
karma-jasmine we used came with its own Jasmine 1.3.
@timwienk timwienk Tests: Make server specFiles somewhat more relevant.
Also includes sinon in server spec runner, since the newly added spec
files use it.
@timwienk timwienk Specs: Adapt a bunch of specs to either work or be skipped in a serve…
…r environment.
@arian arian merged commit 1d6c908 into mootools:master Oct 1, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
@timwienk timwienk deleted the timwienk:spec-update-part-5 branch Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment