mirror of
https://github.com/bitwarden/browser
synced 2025-12-30 15:13:32 +00:00
[PM-18599] Forbid unknown property and element in tests (#13556)
Fail tests when relying on unknownProperties or unknownElements. Existing instances are whitelist and have tickets created and assigned to the relevant teams.
This commit is contained in:
@@ -11,5 +11,13 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/bitwarden/clients"
|
||||
},
|
||||
"license": "GPL-3.0"
|
||||
"license": "GPL-3.0",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
},
|
||||
"./setup-jest": {
|
||||
"import": "./src/setup-jest.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
libs/ui/common/src/setup-jest.ts
Normal file
12
libs/ui/common/src/setup-jest.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import "jest-preset-angular/setup-jest";
|
||||
import { getTestBed } from "@angular/core/testing";
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting,
|
||||
} from "@angular/platform-browser-dynamic/testing";
|
||||
|
||||
getTestBed().resetTestEnvironment();
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
||||
errorOnUnknownElements: true,
|
||||
errorOnUnknownProperties: true,
|
||||
});
|
||||
Reference in New Issue
Block a user