class-strict-mode.js 342 B

12345678910111213141516171819
  1. test("constructors are always strict mode", () => {
  2. class A {
  3. constructor() {
  4. expect(isStrictMode()).toBeTrue();
  5. }
  6. }
  7. new A();
  8. });
  9. test("methods are always strict mode", () => {
  10. class A {
  11. method() {
  12. expect(isStrictMode()).toBeTrue();
  13. }
  14. }
  15. new A().method();
  16. });