jasmine-enzyme: Convert to external module (#20047)

This commit is contained in:
Andy
2017-09-26 11:15:01 -07:00
committed by Mohamed Hegazy
parent d0457afbf0
commit ecfab1f69a
2 changed files with 25 additions and 35 deletions

View File

@@ -7,32 +7,29 @@
/// <reference types="jasmine" />
/// <reference types="react" />
declare namespace jasmine {
interface Matchers<T> {
toBeChecked(): boolean;
toBeDisabled(): boolean;
toBeEmpty(): boolean;
toBePresent(): boolean;
toContainReact(reactInstance: JSX.Element): boolean;
toHaveClassName(className: string): boolean;
toHaveHTML(html: string): boolean;
toHaveProp(propKey: string, propValue?: any): boolean;
toHaveRef(refName: string): string;
toHaveState(stateKey: string, stateValue?: any): boolean;
toHaveStyle(styleKey: string, styleValue?: any): boolean;
toHaveTagName(tagName: string): boolean;
toHaveText(text?: string): boolean;
toIncludeText(text: string): boolean;
toHaveValue(value: any): boolean;
toMatchElement(reactInstance: JSX.Element): boolean;
toMatchSelector(selector: string): boolean;
declare function jasmineEnzyme(): void;
export default jasmineEnzyme;
declare global {
namespace jasmine {
interface Matchers<T> {
toBeChecked(): boolean;
toBeDisabled(): boolean;
toBeEmpty(): boolean;
toBePresent(): boolean;
toContainReact(reactInstance: JSX.Element): boolean;
toHaveClassName(className: string): boolean;
toHaveHTML(html: string): boolean;
toHaveProp(propKey: string, propValue?: any): boolean;
toHaveRef(refName: string): string;
toHaveState(stateKey: string, stateValue?: any): boolean;
toHaveStyle(styleKey: string, styleValue?: any): boolean;
toHaveTagName(tagName: string): boolean;
toHaveText(text?: string): boolean;
toIncludeText(text: string): boolean;
toHaveValue(value: any): boolean;
toMatchElement(reactInstance: JSX.Element): boolean;
toMatchSelector(selector: string): boolean;
}
}
}
declare module "jasmine-enzyme" {
function jasmineEnzyme(): void;
module jasmineEnzyme {
}
export default jasmineEnzyme;
}

View File

@@ -1,8 +1 @@
{
"extends": "dtslint/dt.json",
"rules": {
// The below rules cause issues and I'm not sure how to fix them. Turning them off for now
"no-internal-module": false,
"no-single-declare-module": false
}
}
{ "extends": "dtslint/dt.json" }