Wulf / nodehun

The Hunspell binding for NodeJS that exposes as much of Hunspell as possible and also adds new features. Hunspell is a first class spellcheck library used by Google, Apple, and Mozilla.
MIT License
286 stars 42 forks source link

While running unit test cases getting Nodehun module not found error #113

Open sumit-expleo opened 9 months ago

sumit-expleo commented 9 months ago

TEST_CASE

Cannot find module 'nodehun' from 'spell-check/spell-check-nodehun.service.ts'

  1 | import { Injectable } from '@nestjs/common';
> 2 | import { Nodehun } from 'nodehun';
    | ^
  3 | import { readFile } from '../core-helpers/utils/storage.helper';
  4 |
  5 | @Injectable()

  at Resolver.resolveModule (../node_modules/jest-resolve/build/resolver.js:324:11)
  at Object.<anonymous> (spell-check/spell-check-nodehun.service.ts:2:1)

I am not able to run a unit test using Jest, which has Node.js integrated. I am getting a module not found error in Node.js (nestJS). Please provide solutions for it.