json-api-schema
Version:
JSON Api Schema is a JSON dialect that can describe any Web Based API that uses JSON to exchange data.
22 lines (16 loc) • 384 B
text/coffeescript
Entity = require("../src/model/entity")
class A extends Entity
constructor:->
class B extends Entity
constructor:->
MyPlugin =
extended: ->
hello: ->
console.log "Hello!"
it "Should add plugin only on target entities.", ->
A.extend( MyPlugin )
a = new A()
b = new B()
a.should.have.property("hello")
b.should.not.have.property("hello")