Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

WIP: Prepare Buoy front-end modularization by DRY'ing DOM manipulation. #190

Closed
wants to merge 5 commits into from

Conversation

fabacab
Copy link
Contributor

@fabacab fabacab commented Dec 2, 2016

There's a big problem with this right now in that it will always break the JavaScript tests. See 43477cb for a frustrated commit message and this chat log for a frustrated request for help in the Better Angels Buoy chat room.

This is a work in progress, expect it to change.

Because JavaScript is a fucking mess, and this also DRYs the front-end
testing, Karma will always report failure when running JS tests since
the new global JavaScript object to hold the DOM hooks
(`buoy_dom_hooks`) isn't being loaded in the test runner's container.
Since this object is now dynamically constructed by using WordPress's
`wp_localize_script()`, I don't actually know how to include this in the
test runner. So, it'd be nice if we figured that out at some point.

Meanwhile, we can either:

* Repeat ourselves in the test runner and just *hope* things work.
* DRY the tests and manually duplicate a JS object in the test runner.

I hate both of these options so basically my approach right now is: fuck
JavaScript, and fuck these tests, since we're not actually failing
builds with the JS tests in Travis (yet) anyway. shrug.gif and stuff.
@fabacab
Copy link
Contributor Author

fabacab commented Dec 12, 2016

This has been obsoleted by #204.

@fabacab fabacab closed this Dec 12, 2016
@fabacab fabacab deleted the dry-html-ids branch December 13, 2016 00:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant