mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
LibJS: Implement Intl.Locale.prototype.numeric
This commit is contained in:
parent
d7825f3680
commit
bdf36575c8
3 changed files with 31 additions and 0 deletions
|
@ -0,0 +1,16 @@
|
|||
describe("errors", () => {
|
||||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.numeric;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
});
|
||||
});
|
||||
|
||||
describe("normal behavior", () => {
|
||||
test("basic functionality", () => {
|
||||
expect(new Intl.Locale("en").numeric).toBeFalse();
|
||||
expect(new Intl.Locale("en-u-kn-true").numeric).toBeTrue();
|
||||
expect(new Intl.Locale("en", { numeric: false }).numeric).toBeFalse();
|
||||
expect(new Intl.Locale("en-u-kn-false", { numeric: true }).numeric).toBeTrue();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue