Skip to content

Commit 4981268

Browse files
committed
fix(functions): update schema test to assert SyntaxError message string contains
1 parent f64167b commit 4981268

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/functions/src/__tests__/schema.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ describe('Core Functions / Schema', () => {
324324
]);
325325
});
326326

327-
it('and the unicodeRegExp option is true', async () => {
327+
it('and the unicodeRegExp option is true triggers a SyntaxError', async () => {
328328
expect(await runSchema('\\', { schema, unicodeRegExp: true })).toEqual([
329329
{
330-
message: 'Invalid regular expression: /^[\\_-]$/u: Invalid escape',
330+
message: expect.stringContaining('Invalid regular expression: /' + schema.pattern + '/'),
331331
path: [],
332332
},
333333
]);

0 commit comments

Comments
 (0)