Skip to content

Commit

Permalink
Adjust assertion to allow both Node 18 and 20+ (jupyterlab#16024)
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski authored Mar 20, 2024
1 parent a1166c1 commit 5598b3a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/documentsearch/test/searchmodel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ describe('documentsearch/searchmodel', () => {
expect(model.parsingError).toEqual('');
model.searchExpression = 'query\\';
await signalToPromise(model.stateChanged);
expect(model.parsingError).toEqual(
'SyntaxError: Invalid regular expression: /query\\/: \\ at end of pattern'
);
expect([
// Node 18.x and older
'SyntaxError: Invalid regular expression: /query\\/: \\ at end of pattern',
// Node 20.x and newer
'SyntaxError: Invalid regular expression: /query\\/gim: \\ at end of pattern'
]).toContain(model.parsingError);
});
});

Expand Down

0 comments on commit 5598b3a

Please sign in to comment.