Sha256: 2083725c25c00f80673d80892a10ab22f2dd8accbc58a6dbf4c14367cc350884

Contents?: true

Size: 566 Bytes

Versions: 5

Compression:

Stored size: 566 Bytes

Contents

"use strict";

exports["test common"] = require("./common")

var Method = require("../core")

exports["test host objects"] = function(assert) {
  var isElement = Method("is-element")
  isElement.define(function() { return false })

  isElement.define(Element, function() { return true })

  assert.notDeepEqual(typeof(Element.prototype[isElement]), "number",
                     "Host object's prototype is extended with a number value")

  assert.ok(!isElement({}), "object is not an Element")
  assert.ok(document.createElement("div"), "Element is an element")
}

Version data entries

5 entries across 2 versions & 1 rubygems

Version Path
ruby-wisp-source-0.8.0 vendor/interactivate/node_modules/interactivate/node_modules/method/test/browser.js
ruby-wisp-source-0.8.0 vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/browser.js
ruby-wisp-source-0.7.0 vendor/interactivate/node_modules/interactivate/node_modules/method/test/browser.js
ruby-wisp-source-0.7.0 vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/browser.js
ruby-wisp-source-0.7.0 vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/browser.js