TypeError: jasmine.addMatchers is not a function

I use jasmine: "^ 2.5.2" and in node, I get an error:

 TypeError: jasmine.addMatchers is not a function

when used jasmine-node specfrom the terminal, a simple example works, as shown below.

What can cause this problem and how to fix it?

   function helloWorld() {
      return "Hello world!";
    }

    describe('keyframes-tool', function () {
        it("says hello", function() {
            expect(helloWorld()).toEqual("Hello world!");
        });
    }); 
+4
source share

Source: https://habr.com/ru/post/1663352/


All Articles