jkuester:npm

v1.0.0Published 5 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Meteor NPM Package Test Dependencies

Project Status: Active – The project has reached a stable, usable state and is being actively developed. JavaScript Style Guide

Load npm dependencies in your package-tests.

Just add this package to your Package.onTest list of packages and load the NPM packages your Meteor package requires. Now you don't need to wrap your packages into a Meteor project for integration testing anymore :-)

Usage

  1. Add this package to your tests:
1Package.onTest(function (api) {
2  // ...
3  api.use('jkuester:npm')
4  // ...
5})
  1. Load the npm packages that your package requires in your tests:

package-tests.js

1import { NpmLoader } from 'meteor/jkuester:npm'
2
3NpmLoader.load(['lodash@latest'], (err /*, data */) => {
4  if (err) {
5    throw err
6  }
7})

LICENSE

MIT