subeeshcbabu-zz / swagmock

Mock data generator for swagger api
MIT License
173 stars 38 forks source link

requiring Swagmock under a different name leads to `is not a function` #53

Open ftes opened 6 years ago

ftes commented 6 years ago

This works:

const Swagmock = require('swagmock');
const specMock = Swagmock(apiSpec);

This doesn't:

const swagmock = require('swagmock');
const specMock = swagmock(apiSpec);

Error: TypeError: swagmock is not a function

I can't see how the local variable name would influence the result. Unsure if this is a swagmock issue or an issue in the consuming code.