Skip to content

Commit

Permalink
#113: Add a test to test the test script.
Browse files Browse the repository at this point in the history
Also fix a create react app bug: facebook/create-react-app#6099.
  • Loading branch information
kwokkan committed Nov 11, 2019
1 parent 91a9814 commit 480f2ba
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { nameof } from "./nameof";

interface IMockNameof {
name: string;
}

test("nameof return correct information", () => {
expect(nameof<IMockNameof>("name")).toBe("name");
});
7 changes: 4 additions & 3 deletions apps/CardHero.NetCoreApp.TypeScript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"devDependencies": {
"@babel/core": "7.6.0",
"@babel/plugin-transform-react-jsx": "7.7.0",
"@svgr/webpack": "4.3.2",
"@types/node": "12.12.7",
"@types/react": "16.9.11",
Expand Down Expand Up @@ -110,7 +111,7 @@
},
"jest": {
"roots": [
"<rootDir>/src"
"<rootDir>/ClientApp"
],
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
Expand All @@ -121,8 +122,8 @@
],
"setupFilesAfterEnv": [],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
"<rootDir>/ClientApp/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/ClientApp/**/*.{spec,test}.{js,jsx,ts,tsx}"
],
"testEnvironment": "jest-environment-jsdom-fourteen",
"transform": {
Expand Down
26 changes: 26 additions & 0 deletions apps/CardHero.NetCoreApp.TypeScript/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@
"@babel/types" "^7.3.0"
esutils "^2.0.0"

"@babel/helper-builder-react-jsx@^7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.7.0.tgz#c6b8254d305bacd62beb648e4dea7d3ed79f352d"
integrity sha512-LSln3cexwInTMYYoFeVLKnYPPMfWNJ8PubTBs3hkh7wCu9iBaqq1OOyW+xGmEdLxT1nhsl+9SJ+h2oUDYz0l2A==
dependencies:
"@babel/types" "^7.7.0"
esutils "^2.0.0"

"@babel/helper-call-delegate@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43"
Expand Down Expand Up @@ -620,6 +628,15 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-jsx" "^7.2.0"

"@babel/[email protected]":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.7.0.tgz#834b0723ba78cd4d24d7d629300c2270f516d0b7"
integrity sha512-mXhBtyVB1Ujfy+0L6934jeJcSXj/VCg6whZzEcgiiZHNS0PGC7vUCsZDQCxxztkpIdF+dY1fUMcjAgEOC3ZOMQ==
dependencies:
"@babel/helper-builder-react-jsx" "^7.7.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-jsx" "^7.2.0"

"@babel/plugin-transform-react-jsx@^7.0.0":
version "7.3.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz#f2cab99026631c767e2745a5368b331cfe8f5290"
Expand Down Expand Up @@ -897,6 +914,15 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@babel/types@^7.7.0":
version "7.7.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7"
integrity sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==
dependencies:
esutils "^2.0.2"
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@cnakazawa/watch@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef"
Expand Down

0 comments on commit 480f2ba

Please sign in to comment.