Skip to content

Tests: Module not found: Error: Can't resolve 'meteor/meteor' #2

@rgal75

Description

@rgal75

In an attempt to write a karma test in the angularcli-meteor template, I added a test case, which depends on Meteor by importing 'meteor/meteor' in a class under test.
Then, if I issue
$> npm run test
I get
Module not found: Error: Can't resolve 'meteor/meteor'

To easily reproduce the issue, modify app.component.ts by calling anything on Meteor. E.g.

...
import { Meteor } from 'meteor/meteor'
...
ngOnInit() {
    console.log(Meteor.release)
    ...
  }

and run
$> npm run test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions