Mylloon
2cc6c0bd74
Some checks failed
Publish latest version / build (push) Failing after 1m15s
- close #100 - find timezone based on locale - Add tests - Add tests to CI - Close #182 - Close #183 Reviewed-on: #181 Co-authored-by: Mylloon <kennel.anri@tutanota.com> Co-committed-by: Mylloon <kennel.anri@tutanota.com>
26 lines
730 B
TypeScript
26 lines
730 B
TypeScript
import { RegexC, RegExpFlags } from "../../utils/regex";
|
|
|
|
describe("Regex flags", () => {
|
|
test("One parameter", () => {
|
|
const regex = RegexC("", RegExpFlags.Global);
|
|
expect(regex.global).toBeTruthy();
|
|
});
|
|
|
|
test("All parameters", () => {
|
|
const regex = RegexC(
|
|
"",
|
|
RegExpFlags.Global |
|
|
RegExpFlags.MultiLine |
|
|
RegExpFlags.Insensitive |
|
|
RegExpFlags.Sticky |
|
|
RegExpFlags.Unicode |
|
|
RegExpFlags.SingleLine,
|
|
);
|
|
expect(regex.global).toBeTruthy();
|
|
expect(regex.multiline).toBeTruthy();
|
|
expect(regex.ignoreCase).toBeTruthy();
|
|
expect(regex.sticky).toBeTruthy();
|
|
expect(regex.unicode).toBeTruthy();
|
|
expect(regex.dotAll).toBeTruthy();
|
|
});
|
|
});
|