How to use the moleculer.Errors.MoleculerServerError function in moleculer

To help you get started, we’ve selected a few moleculer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github moleculerjs / moleculer-apollo-server / test / unit / service.spec.js View on Github external
it("should throw further the error", async () => {
			makeExecutableSchema.mockImplementation(() => {
				throw new Error("Something is wrong");
			});
			const { broker, svc, stop } = await startService();

			expect(() => svc.generateGraphQLSchema([])).toThrow(Errors.MoleculerServerError);

			await stop();
		});
	});