Last active
August 24, 2017 15:36
-
-
Save indigokidsgames/e11ab7626837c0ecba79648202229fe8 to your computer and use it in GitHub Desktop.
Feathers-mongodb bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const adapter = require('feathers-mongodb') | |
const feathers = require('feathers') | |
class Service extends adapter.Service { | |
constructor (options) { | |
super(options) | |
this.addedInConstructor = 'foo' | |
setTimeout(() => this.testFn(), 3000) | |
} | |
setup (app) { | |
this.app = app | |
console.log('setup. app: %s, constructor: %s', !!this.app, !!this.addedInConstructor) | |
console.log(this.__proto__) | |
} | |
testFn () { | |
console.log('testFn. app: %s, constructor: %s', !!this.app, !!this.addedInConstructor) | |
console.log(this.__proto__) | |
} | |
} | |
const app = feathers() | |
const options = {} | |
app.use('/test', new Service(options)) | |
app.listen(12345) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actual result:
Expected: