blob: aa18a0b907b7d3f1d60cc5b71b6bafaaf98d4b09 (
plain)
1
2
3
4
5
6
7
8
9
|
test("basic functionality", () => {
// FIXME: update when toString is spec-compliant
expect(RegExp().toString()).toBe("//");
expect(RegExp(undefined).toString()).toBe("//");
expect(RegExp("foo").toString()).toBe("/foo/");
expect(RegExp("foo", undefined).toString()).toBe("/foo/");
expect(RegExp("foo", "g").toString()).toBe("/foo/g");
expect(RegExp(undefined, "g").toString()).toBe("//g");
});
|