JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
tests pass running under node.js
[peach-html5-editor.git] / test.coffee
index 02ebec3..62b297c 100644 (file)
@@ -26,8 +26,8 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
-# The rest of this file was written by Jason Woofenden in 2015, and is released
-# under the terms of the CC0 license:
+# The rest of this file was written by Jason Woofenden in 2015-2016, and is
+# released under the terms of the CC0 license:
 # http://creativecommons.org/publicdomain/zero/1.0/ and into the public domain
 
 tests = [
@@ -7931,10 +7931,10 @@ tests = [
        }
 ]
 
-if window?.wheic?
-       wheic = window.wheic
+if typeof module isnt 'undefined' and module.exports?
+       wheic = require './parse-html.coffee'
 else
-       wheic = require './wheic.js'
+       wheic = window.wheic
 
 serialize_els = (els, prefix = '| ') ->
        ret = ''