strongloop/loopback4-example-microservices

Test error for todo-legacy

rahulrkr08 opened this issue · 2 comments

Hi,

I am getting error when doing 'npm test' for todo-legacy services.

Error:

RUN TESTS - todo-legacy:
npm WARN todo@1.0.0 No repository field.

Warning: Could not find any test files matching pattern: /Users/rahulradhakrishnan/Documents/projects/myprojects/loopback-next-example/services/account-without-juggler/test/**/*test.ts

/Users/rahulradhakrishnan/Documents/projects/myprojects/loopback-next-example/node_modules/ts-node/src/index.ts:307
throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
^

TSError: ⨯ Unable to compile TypeScript
services/todo-legacy/test/controller/todo-controller.test.ts (14,1): Cannot find name 'describe'. (2304)
services/todo-legacy/test/controller/todo-controller.test.ts (33,3): Cannot find name 'describe'. (2304)
services/todo-legacy/test/controller/todo-controller.test.ts (35,5): Cannot find name 'beforeEach'. (2304)
services/todo-legacy/test/controller/todo-controller.test.ts (38,5): Cannot find name 'it'. (2304)
services/todo-legacy/test/controller/todo-controller.test.ts (44,5): Cannot find name 'it'. (2304)

Description/Steps to reproduce

run 'npm test'

Additional information

darwin x64 8.3.0

Apologies, I've been very preoccupied with loopback-next development!

It sounds like you're having issues resolving the Mocha library as it currently exists. I know some other breaking changes were made to this repository that may have left todo-legacy in a bad state. I'm currently working on a PR to fix it, though.

Issue is resolved.