From 93e73e300793c1b9ac4b3e5091d6ef5c25901e4c Mon Sep 17 00:00:00 2001
From: Margarita Golubeva <margaret.golubeva@gmail.com>
Date: Fri, 16 Aug 2024 18:20:30 +0300
Subject: [PATCH] fix: ng zorro tests

---
 jest.config.ts                      |  1 +
 src/__mocks__/ng-zorro-antd-mock.ts | 12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 src/__mocks__/ng-zorro-antd-mock.ts

diff --git a/jest.config.ts b/jest.config.ts
index 859b5fa..e9e478e 100644
--- a/jest.config.ts
+++ b/jest.config.ts
@@ -16,6 +16,7 @@ const config: Config = {
   testEnvironment: 'jsdom',
   moduleNameMapper: {
     '^src/(.*)$': '<rootDir>/src/$1',
+    '^ng-zorro-antd/(.*)$': '<rootDir>/src/__mocks__/ng-zorro-antd-mock.ts',
   },
   testPathIgnorePatterns: ['<rootDir>/dist/', 'dist'],
 };
diff --git a/src/__mocks__/ng-zorro-antd-mock.ts b/src/__mocks__/ng-zorro-antd-mock.ts
new file mode 100644
index 0000000..2a78fa4
--- /dev/null
+++ b/src/__mocks__/ng-zorro-antd-mock.ts
@@ -0,0 +1,12 @@
+import { NgModule } from '@angular/core';
+
+@NgModule({
+  exports: [],
+  imports: [],
+  declarations: [],
+  providers: [],
+})
+export class NzButtonModule {
+  public static ɵmod = { type: NzButtonModule };
+  public static ɵinj = { factory: (): NzButtonModule => new NzButtonModule() };
+}