-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c542fb
commit 32bd8d8
Showing
18 changed files
with
170 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/matcher/type/MatchingStringMatcher.ts → src/matcher/type/MatchStringMatcher.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import {AnyFunctionMatcher} from "./AnyFunctionMatcher"; | ||
import {AnyNumberMatcher} from "./AnyNumberMatcher"; | ||
import {AnyOfClassMatcher} from "./AnyOfClassMatcher"; | ||
import {AnyStringMatcher} from "./AnyStringMatcher"; | ||
import {AnythingMatcher} from "./AnythingMatcher"; | ||
import {BetweenMatcher} from "./BetweenMatcher"; | ||
import {DeepEqualMatcher} from "./DeepEqualMatcher"; | ||
import {Matcher} from "./Matcher"; | ||
import {MatchStringMatcher} from "./MatchStringMatcher"; | ||
import {NotNullMatcher} from "./NotNullMatcher"; | ||
import {ObjectContainingMatcher} from "./ObjectContainingMatcher"; | ||
import {StrictEqualMatcher} from "./StrictEqualMatcher"; | ||
|
||
export class Not { | ||
|
||
public anyOfClass<T>(expectedClass: {new (...args: any[]): T}): Matcher { | ||
return (new AnyOfClassMatcher<T>(expectedClass)).reverse(); | ||
} | ||
|
||
public anyFunction(): Matcher { | ||
return (new AnyFunctionMatcher()).reverse(); | ||
} | ||
|
||
public anyNumber(): Matcher { | ||
return (new AnyNumberMatcher()).reverse(); | ||
} | ||
|
||
public anyString(): Matcher { | ||
return (new AnyStringMatcher()).reverse(); | ||
} | ||
|
||
public anything(): Matcher { | ||
return (new AnythingMatcher()).reverse(); | ||
} | ||
|
||
public between(min: number, max: number): Matcher { | ||
return (new BetweenMatcher(min, max)).reverse(); | ||
} | ||
|
||
public deepEqual(expectedValue: any): Matcher { | ||
return (new DeepEqualMatcher(expectedValue)).reverse(); | ||
} | ||
|
||
public notNull(): Matcher { | ||
return (new NotNullMatcher()).reverse(); | ||
} | ||
|
||
public strictEqual(expectedValue: any): Matcher { | ||
return (new StrictEqualMatcher(expectedValue)).reverse(); | ||
} | ||
|
||
public matchString(expectedValue: string | RegExp): Matcher { | ||
return (new MatchStringMatcher(expectedValue)).reverse(); | ||
} | ||
|
||
public objectContaining(expectedValue: Object): Matcher { | ||
return (new ObjectContainingMatcher(expectedValue)).reverse(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.