DisplayNames.js 367 B

12345678910111213
  1. describe("errors", () => {
  2. test("called without new", () => {
  3. expect(() => {
  4. Intl.DisplayNames();
  5. }).toThrowWithMessage(TypeError, "Intl.DisplayNames constructor must be called with 'new'");
  6. });
  7. });
  8. describe("normal behavior", () => {
  9. test("length is 2", () => {
  10. expect(Intl.DisplayNames).toHaveLength(2);
  11. });
  12. });