@testspectra/matchers 1.1.8-rc.11 → 1.1.8-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* state-inspection methods.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { AssertionOptions, ScopedSelector } from '../types';
|
|
10
|
+
import type { AssertionOptions, ScopedSelector } from '../types.js';
|
|
11
11
|
|
|
12
12
|
export function createElementAssertions(
|
|
13
13
|
selector: string | ScopedSelector,
|
|
@@ -294,7 +294,8 @@ export function createElementAssertions(
|
|
|
294
294
|
actual = await state.getText();
|
|
295
295
|
return actual.includes(String(substring));
|
|
296
296
|
}, options?.timeoutMs ?? globalThis.__TS_RUNTIME__.getAssertionTimeoutMs());
|
|
297
|
-
if (!ok)
|
|
297
|
+
if (!ok)
|
|
298
|
+
throw new Error(`Expected element "${selectorText}" to contain text "${substring}", but got "${actual}"`);
|
|
298
299
|
},
|
|
299
300
|
);
|
|
300
301
|
}
|
|
Binary file
|
|
Binary file
|