mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[Detox] DetoxJestAdapter overlaps CustomReporter
DetoxJestAdapter needs to overlap jasmine.CustomReporter since the latter is a weak interface; otherwise the code that is needed to run Detox with Jest will throw errors when compiled.
This commit is contained in:
3
types/detox/runners/jest/adapter/index.d.ts
vendored
3
types/detox/runners/jest/adapter/index.d.ts
vendored
@@ -2,6 +2,9 @@ interface DetoxJestAdapter {
|
||||
detox: Detox.Detox;
|
||||
beforeEach: () => Promise<void>;
|
||||
afterAll: () => Promise<void>;
|
||||
// These are not publicly used, but are defined in order to overlap with the jasmine.CustomReporter interface (which is a weak interface)
|
||||
specDone: () => void;
|
||||
specStarted: () => void;
|
||||
}
|
||||
|
||||
declare const adapter: DetoxJestAdapter;
|
||||
|
||||
@@ -8,6 +8,9 @@ import adapter from "detox/runners/jest/adapter";
|
||||
// const config = require("./package.json").detox;
|
||||
declare const config: any;
|
||||
|
||||
declare const jasmine: any;
|
||||
jasmine.getEnv().addReporter(adapter);
|
||||
|
||||
beforeAll(async () => {
|
||||
await detox.init(config);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user