Skip to content

How to import the package in tests #35

Description

@molinto

Hi @apendua, thanks for your great work.

I'm hoping to compare a i18n value against a test value, but cannot get package to be imported as keeps saying. Error: Cannot find module 'meteor/anti:i18n'.

Tests are being ran via npm run test:dev-chimp:

"test:dev-chimp": "chimp --ddp=http://localhost:3000 --path=tests --watch --chai --mocha"

Code when testing (been shortened):

import { assert } from 'chai';
import i18n from 'meteor/anti:i18n';

...

it('Correct page title', function() {
   let title = browser.getTitle();
   expect(title).to.equal(i18n("pages.settings.user.settings"))
});

...

Any help greatly appreciated :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions