I don't really know why this is happening, but I started getting
TypeError: constructor.schema.unwrap is not a function
at Array.<anonymous> (/opt/node_modules/js-schema/lib/patterns/class.js:36:31)
at lastDefinedResult (/opt/node_modules/js-schema/lib/BaseSchema.js:107:26)
at Array.<anonymous> (/opt/node_modules/js-schema/lib/patterns/object.js:216:27)
at lastDefinedResult (/opt/node_modules/js-schema/lib/BaseSchema.js:107:26)
at Array.<anonymous> (/opt/node_modules/js-schema/lib/patterns/object.js:216:27)
at lastDefinedResult (/opt/node_modules/js-schema/lib/BaseSchema.js:107:26)
at Object.resolve (/opt/node_modules/js-schema/lib/extensions/Schema.js:10:31)
at Object.ref.resolve (/opt/node_modules/js-schema/lib/extensions/Schema.js:33:46)
at module.exports (/opt/node_modules/js-schema/lib/schema.js:22:17)
...
I think it had something to do with using proxyquire in my test-setup and mocking something I shouldn't have. Completely rewriting the test got rid of the error message.
I don't really know why this is happening, but I started getting
when trying to do this in a module:
When moving the code outside of the coroutine, I don't get this error ..!? This worked before - even inside a coroutine - but doesn't right now.