Open ghost opened 10 years ago
mocker.getMetadata
to the stub file and use mocker.generateFromMetadata
in the out of context runner to generate the concrete stub objects. We can easily generate new concrete stub objects for each test. (the metadata abstraction is really nice :-))Package
object. That makes it easy to just stub the packages. With that we no longer need other package detection strategies I guess.
Just:var stubsMetadata = mocker.getMetadata(Package)
fs.writeFile('stubs-metadata.json', JSON.stringify(stubsMetadata, null, ' '))`
https://www.npmjs.org/package/component-mocker