mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
LibJS: Implement (mostly) String.prototype.match
JavaScript has a couple of different ways to run a regular expression on a string. This adds support for one more. :^)
This commit is contained in:
parent
2c24c0e451
commit
1db943e146
7 changed files with 91 additions and 1 deletions
|
@ -0,0 +1,6 @@
|
|||
test("basic functionality", () => {
|
||||
expect(String.prototype.match).toHaveLength(1);
|
||||
|
||||
expect("hello friends".match(/hello/)).not.toBeNull();
|
||||
expect("hello friends".match(/enemies/)).toBeNull();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue