File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ export type SnapshotOptions = {
2929} ;
3030
3131export interface Assertions {
32+ /** Assert that `actual` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy). Comes with power-assert. */
33+ assert : AssertAssertion ;
34+
3235 /** Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to `expected`. */
3336 deepEqual : DeepEqualAssertion ;
3437
@@ -96,6 +99,14 @@ export interface Assertions {
9699 truthy : TruthyAssertion ;
97100}
98101
102+ export interface AssertAssertion {
103+ /** Assert that `actual` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy). Comes with power-assert. */
104+ ( actual : any , message ?: string ) : void ;
105+
106+ /** Skip this assertion. */
107+ skip ( actual : any , message ?: string ) : void ;
108+ }
109+
99110export interface DeepEqualAssertion {
100111 /** Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to `expected`. */
101112 < ValueType = any > ( actual : ValueType , expected : ValueType , message ?: string ) : void ;
Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ export type SnapshotOptions = {
4242};
4343
4444export interface Assertions {
45+ /** Assert that `actual` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy). Comes with power-assert. */
46+ assert: AssertAssertion;
47+
4548 /** Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to `expected`. */
4649 deepEqual: DeepEqualAssertion;
4750
@@ -109,6 +112,14 @@ export interface Assertions {
109112 truthy: TruthyAssertion;
110113}
111114
115+ export interface AssertAssertion {
116+ /** Assert that `actual` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy). Comes with power-assert. */
117+ (actual: any, message?: string): void;
118+
119+ /** Skip this assertion. */
120+ skip(actual: any, message?: string): void;
121+ }
122+
112123export interface DeepEqualAssertion {
113124 /** Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to `expected`. */
114125 (actual: any, expected: any, message?: string): void;
You can’t perform that action at this time.
0 commit comments