New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec update parts 1-5 #2736

merged 19 commits into from Oct 1, 2015


None yet
2 participants

timwienk commented Sep 30, 2015

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

.travis.yml: Remove before_script downloading Sauce Connect.
karma-sauce-connect uses sauce-connect-launcher to download the
right Sauce Connect.
Gruntfile.js: Add "default:dev" and "nocompat:dev" tasks.
These tasks use the karma:dev config that's already there.
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.
Tests: Replace Tests/Utilities/syn.js with syn package + karma plugin.
Also updated Specs files to work with newer version of syn.
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/
+++ b/src/
@@ -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 () {
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.
Tests: Make server specFiles somewhat more relevant.
Also includes sinon in server spec runner, since the newly added spec
files use it.

arian added a commit that referenced this pull request Oct 1, 2015

@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