Skip to content
JS
Comparison

mock-socket vs ng-mocks

TestingPackage data 25 Sept 2026
mock-socketv9.3.1, 11 Sept 2023

Javascript mocking library for websockets and socket.io

$ npm install mock-socket
ng-mocksv14.18.1, 18 Sept 2026

ng-mocks simplifies Angular testing with mock dependencies, shallow rendering and less boilerplate. Mock components, services, directives, pipes and modules in Angular 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 with Jasmine, Jest or Vitest.

$ npm install ng-mocks
Metricmock-socketng-mocksDifference
Weekly downloads684,522404,583mock-socket 1.7x higher
12-month download growth+56%-0%mock-socket +56 pts
Gzip size---
Minified size---
Dependencies00Same
Unpacked size326 kB2.1 MBmock-socket 6.6x smaller
Latest release9.3.1, 11 Sept 202314.18.1, 18 Sept 2026ng-mocks 3.0 years more recent
Releases, last 12 months016ng-mocks 16 more
First published27 Nov 201410 Feb 2018mock-socket 3.2 years earlier
GitHub stars8061,159ng-mocks +44%
Open issues6515mock-socket 50 more
Open pull requests1045ng-mocks 35 more
Contributors---
Commits, last 52 weeks02,615ng-mocks higher
TypeScript typesNoneBundledDiffers
Module formatCommonJSESM + CommonJSDiffers
Runtimes---
LicenseMITMITSame

Green marks the smaller size or the more recent release. Bold marks the higher count, with no judgement implied. Sizes are for the whole package per Bundlephobia. Growth compares the average of the last 4 weeks with the first 4 weeks of the 52-week series.

mock-socket684.5k latest weekng-mocks404.6k latest week
Week of 23 Sept 2025Week of 15 Sept 2026
Weekly npm downloads, 52 weeks. Y axis starts at zero. Values are not smoothed.

mock-socket

Major versions
  1. 0.0.127 Nov 2014
  2. 1.0.022 Dec 2015
  3. 2.0.013 Jan 2016
  4. 3.0.06 Jun 2016
  5. 4.0.03 Aug 2016
  6. 5.0.06 Sept 2016
  7. 6.0.031 Oct 2016
  8. 7.0.04 Aug 2017
  9. 8.0.05 Jul 2018
  10. 9.0.029 Jul 2019
Last 5 releases
  1. 9.3.111 Sept 2023
  2. 9.3.05 Sept 2023
  3. 9.2.114 Feb 2023
  4. 9.2.09 Feb 2023
  5. 9.1.57 Jun 2022
71 releases in total, 0 in the last 12 months

ng-mocks

Major versions
  1. 5.0.025 Mar 2018
  2. 6.0.014 May 2018
  3. 7.0.026 Oct 2018
  4. 8.0.03 Jun 2019
  5. 9.0.011 Feb 2020
  6. 10.0.05 Jul 2020
  7. 11.0.015 Nov 2020
  8. 12.0.013 May 2021
  9. 13.0.023 Jan 2022
  10. 14.0.018 Jun 2022
Last 5 releases
  1. 14.18.118 Sept 2026
  2. 14.18.015 Sept 2026
  3. 14.17.610 Sept 2026
  4. 14.17.56 Sept 2026
  5. 14.17.45 Sept 2026
169 releases in total, 16 in the last 12 months
mock-socket

-

ng-mocks

-

mock-socket

-

ng-mocks

-

  • Need no runtime dependenciesBoth
  • Need both ESM and CommonJS entry pointsng-mocks (mock-socket: CommonJS; ng-mocks: ESM + CommonJS)
  • Need to load it with require()Both
  • Need TypeScript types in the package itselfng-mocks (mock-socket: None; ng-mocks: Bundled)
  • Node.js version requirementmock-socket: >= 8; ng-mocks: none declared (engines field in package.json)
  • Need the more recent releaseng-mocks (14.18.1 on 18 Sept 2026 vs 9.3.1 on 11 Sept 2023)
  • Higher weekly npm downloadsmock-socket (684.5k vs 404.6k)

Each line is generated from the data above.

mock-socket: mock-socket npm registry, mock-socket npm downloads, mock-socket GitHub. Data fetched 25 Sept 2026.
ng-mocks: ng-mocks npm registry, ng-mocks npm downloads, ng-mocks GitHub. Data fetched 25 Sept 2026.

Indexability: Indexed.