MCPcopy Index your code
hub / github.com/Legitcode/tests / mixin

Function mixin

src/tests.js:53–61  ·  view source on GitHub ↗
(spec)

Source from the content-addressed store, hash-verified

51 return this
52 },
53 mixin(spec) {
54 Object.keys(spec).forEach(key => {
55 this[key] = (...args) => {
56 spec[key].call(this, ...args)
57 return this
58 }
59 })
60 return this
61 },
62 test(callback) {
63 const param = {...this, ...this.elements}
64 callback.call(param, param)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected