vendredi 2 décembre 2016

Loading nock on intern

I am trying to use nock (http://ift.tt/1Yi617y) in my tests.

If I write var nock = require('nock'); it won't find it as it is not loaded.

I have added the package in loaderOptions, and now I have to put var nock = require('nock/index');, because if I write the require('nock') it tries to load node_modules/nock/main, but it does not exists.

The library tries internally to load some modules nock brings with, but intern says Error: Attempt to require unloaded module lib/recorder.

I added nock into packages with: { name: 'nock', location: 'node_modules/nock' }

Any clue?

Thanks.

Aucun commentaire:

Enregistrer un commentaire