This repository has been archived by the owner on Jan 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 683
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build, bump deps for node4, sync currentTarget.
Existing `master` was failing. We specify our jquery dependency with `>= 1.5` which at some point between the previous PR and now started picking up a `>2.0.0` release. jQuery2 doesn't work with the old version of jsdom we use. The latest version of jsdom requires nodejs >= 4.0. The latest jsdom also introduced some issues with our tests: previously, `selectionStart` was undefined, but they have since added support for it. Some tests set values directly e.g. with `.val('4242')` and then try to format by triggering an event. This once worked when `selectionStart` was `undefined`, but since jsdom added a `selectionStart` API, our `formatCardNumber` implementation saw it as `0` (rather than `undefined`), not matching the end of the input, and returned early. Those tests were updated to move `selectionStart` to the correct position before triggering the formatting event. The latest jsdom + zepto also results in `e.currentTarget` being undefined in async handling of events, for some reason. In the `format*` funcs, `e.currentTarget` is saved to a local synchronously. In the `reFormat*` funcs, it was grabbed async, causing some tests to fail. The `reFormat*` funcs were updated to grab `e.currentTarget` synchronously. This was the only change to production code.
- Loading branch information
1 parent
5e562dc
commit 3981695
Showing
8 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "4" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters