e22m4u 1 неделя назад
Родитель
Сommit
43d2a49f9e
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      package.json
  2. 2 2
      src/service-container.spec.js

+ 1 - 1
package.json

@@ -44,7 +44,7 @@
   "devDependencies": {
     "@commitlint/cli": "~20.1.0",
     "@commitlint/config-conventional": "~20.0.0",
-    "@e22m4u/js-spy": "~0.1.0",
+    "@e22m4u/js-spy": "~0.2.0",
     "@eslint/js": "~9.39.1",
     "c8": "~10.1.3",
     "chai": "~6.2.1",

+ 2 - 2
src/service-container.spec.js

@@ -756,7 +756,7 @@ describe('ServiceContainer', function () {
       container.add(MyService);
       const res = container.getRegistered(MyService, 'arg1', 'arg2');
       expect(spy.callCount).to.be.eq(1);
-      expect(spy.getCall(0).args).to.be.eql([MyService, 'arg1', 'arg2']);
+      expect(spy.calls[0].args).to.be.eql([MyService, 'arg1', 'arg2']);
       expect(res).to.be.eql('result');
     });
   });
@@ -1465,7 +1465,7 @@ describe('ServiceContainer', function () {
       });
       expect(result).to.equal(childInstance);
       expect(foundContainerSpy.callCount).to.be.eq(1);
-      expect(foundContainerSpy.getCall(0).args[0]).to.equal(child);
+      expect(foundContainerSpy.calls[0].args[0]).to.equal(child);
     });
 
     it('should pass the correct constructor and container to the predicate', function () {