mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Merge pull request #32927 from solkaz/detox-default-export
[detox] Remove named export, define default export
This commit is contained in:
Vendored
+12
-6
@@ -42,6 +42,16 @@ declare global {
|
||||
*/
|
||||
cleanup(): Promise<void>;
|
||||
}
|
||||
|
||||
// Detox exports all methods from detox global and all of the global constants.
|
||||
interface DetoxExport extends Detox {
|
||||
device: Device;
|
||||
element: Element;
|
||||
waitFor: WaitFor;
|
||||
expect: Expect<Expect<any>>;
|
||||
by: Matchers;
|
||||
}
|
||||
|
||||
interface Device {
|
||||
/**
|
||||
* Launch the app
|
||||
@@ -434,10 +444,6 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
export { by, detox, device, element, waitFor };
|
||||
declare const detoxExport: Detox.DetoxExport;
|
||||
|
||||
// Not exporting the global `expect` from the top of the file here
|
||||
// because `expect` conflicts with the global `expect` of jest and
|
||||
// therefore exporting it doesn't work. The global `expect` is kept
|
||||
// for backwards compatibility though.
|
||||
export const expect: Detox.Expect<Detox.Expect<any>>;
|
||||
export = detoxExport;
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ interface DetoxJestAdapter {
|
||||
|
||||
declare const adapter: DetoxJestAdapter;
|
||||
|
||||
export default adapter;
|
||||
export = adapter;
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ interface DetoxMochaAdapter {
|
||||
|
||||
declare const adapter: DetoxMochaAdapter;
|
||||
|
||||
export default adapter;
|
||||
export = adapter;
|
||||
|
||||
@@ -2,7 +2,8 @@ declare var beforeAll: (callback: () => void) => void;
|
||||
declare var beforeEach: (callback: () => void) => void;
|
||||
declare var afterAll: (callback: () => void) => void;
|
||||
|
||||
import adapter from "detox/runners/jest/adapter";
|
||||
import detox = require("detox");
|
||||
import adapter = require("detox/runners/jest/adapter");
|
||||
|
||||
// Normally the Detox configuration from the project's package.json like so:
|
||||
// const config = require("./package.json").detox;
|
||||
|
||||
@@ -5,7 +5,8 @@ declare var beforeEach: (callback: () => void) => void;
|
||||
declare var after: (callback: () => void) => void;
|
||||
declare var afterEach: (callback: () => void) => void;
|
||||
|
||||
import adapter from "detox/runners/mocha/adapter";
|
||||
import * as detox from "detox";
|
||||
import * as adapter from "detox/runners/mocha/adapter";
|
||||
|
||||
// Normally the Detox configuration from the project's package.json like so:
|
||||
// const config = require("./package.json").detox;
|
||||
|
||||
Reference in New Issue
Block a user