From 05af9f04ed9d8504cd697ee75925b8ddf45bd8ac Mon Sep 17 00:00:00 2001 From: Keyan Zhang Date: Sat, 14 Mar 2020 21:12:39 -0700 Subject: [PATCH] [easy] run typechecking on CI (#954) --- .github/workflows/lint.yml | 1 + package.json | 1 + src/element/newElement.test.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a5e3c84f..92e731a0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,5 +19,6 @@ jobs: npm ci npm run test:other npm run test:code + npm run test:typecheck env: CI: true diff --git a/package.json b/package.json index 62030a74..a02f284c 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "test:app": "react-scripts test --env=jsdom --passWithNoTests", "test:debug": "react-scripts --inspect-brk test --runInBand --no-cache", "test:code": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .", + "test:typecheck": "tsc", "test:other": "npm run prettier -- --list-different" }, "version": "1.0.0", diff --git a/src/element/newElement.test.ts b/src/element/newElement.test.ts index 4e52f3fa..a37e6973 100644 --- a/src/element/newElement.test.ts +++ b/src/element/newElement.test.ts @@ -41,6 +41,7 @@ it("clones arrow element", () => { assertCloneObjects(element, copy); + // @ts-ignore expect(copy.__proto__).toEqual({ hello: "world" }); expect(copy.hasOwnProperty("hello")).toBe(false);