Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
test: added test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrsskls committed Sep 1, 2020
1 parent 16411de commit 94b3ce1
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 16 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ module.exports = deepMerge(jestConfig, {
rootDir: "packages",
collectCoverage: true,
collectCoverageFrom: ["**/*.js", "!**/.*.js", "!**/*.config.js"],
setupFilesAfterEnv: ["../setupTests.js"],
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"deepmerge": "^4.2.2",
"eslint": "^7.7.0",
"jest": "^26.4.2",
"regenerator-runtime": "^0.13.7",
"standard-version": "^8.0.2"
},
"dependencies": {
Expand Down
11 changes: 3 additions & 8 deletions packages/javascript/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ module.exports = {
"airbnb-base",
"plugin:prettier/recommended",
"plugin:jsdoc/recommended",
"plugin:jest/recommended",
],
plugins: ["prettier", "jsdoc"],
plugins: ["prettier", "jsdoc", "jest"],
rules: {
"prettier/prettier": "error",
"no-use-before-define": ["error", { functions: false }],
Expand All @@ -23,12 +24,6 @@ module.exports = {
},
env: {
browser: true,
},
globals: {
describe: true,
it: true,
jest: true,
test: true,
expect: true,
"jest/globals": true,
},
};
1 change: 1 addition & 0 deletions packages/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^23.20.0",
"eslint-plugin-jsdoc": "^30.3.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.4.2",
Expand Down
53 changes: 50 additions & 3 deletions packages/javascript/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,11 @@
jest-diff "^25.2.1"
pretty-format "^25.2.1"

"@types/json-schema@^7.0.3":
version "7.0.5"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd"
integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==

"@types/json5@^0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
Expand Down Expand Up @@ -1262,6 +1267,29 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/experimental-utils@^2.5.0":
version "2.34.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f"
integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.34.0"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/[email protected]":
version "2.34.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5"
integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"

abab@^2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.4.tgz#6dfa57b417ca06d21b2478f0e638302f99c2405c"
Expand Down Expand Up @@ -2120,6 +2148,13 @@ eslint-plugin-import@^2.22.0:
resolve "^1.17.0"
tsconfig-paths "^3.9.0"

eslint-plugin-jest@^23.20.0:
version "23.20.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz#e1d69c75f639e99d836642453c4e75ed22da4099"
integrity sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==
dependencies:
"@typescript-eslint/experimental-utils" "^2.5.0"

eslint-plugin-jsdoc@^30.3.0:
version "30.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.3.0.tgz#11f169d6ab52c56c77aa68d1458f268655e16db4"
Expand All @@ -2140,15 +2175,15 @@ eslint-plugin-prettier@^3.1.4:
dependencies:
prettier-linter-helpers "^1.0.0"

eslint-scope@^5.1.0:
eslint-scope@^5.0.0, eslint-scope@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5"
integrity sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==
dependencies:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint-utils@^2.1.0:
eslint-utils@^2.0.0, eslint-utils@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
Expand Down Expand Up @@ -3630,7 +3665,7 @@ lodash.sortby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=

lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20:
lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
Expand Down Expand Up @@ -4997,6 +5032,18 @@ tsconfig-paths@^3.9.0:
minimist "^1.2.0"
strip-bom "^3.0.0"

tslib@^1.8.1:
version "1.13.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==

tsutils@^3.17.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
dependencies:
tslib "^1.8.1"

tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
Expand Down
1 change: 1 addition & 0 deletions setupTests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require("regenerator-runtime/runtime");
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@
minimist "^1.2.0"

"@factorial/core@file:packages/core":
version "0.0.0"
version "0.1.2"
dependencies:
chalk "^4.1.0"
chokidar "^3.4.2"
Expand All @@ -866,7 +866,7 @@
inquirer "^7.3.3"

"@factorial/css@file:packages/css":
version "0.0.0"
version "0.1.0"
dependencies:
autoprefixer "^9.8.6"
chalk "^4.1.0"
Expand All @@ -884,7 +884,7 @@
stylelint-selector-bem-pattern "^2.1.0"

"@factorial/javascript@file:packages/javascript":
version "0.0.0"
version "0.1.1"
dependencies:
"@babel/core" "^7.11.4"
"@babel/plugin-proposal-object-rest-spread" "^7.11.0"
Expand All @@ -910,7 +910,7 @@
rollup-plugin-terser "^7.0.0"

"@factorial/twig@file:packages/twig":
version "0.0.0"
version "0.1.0"
dependencies:
chalk "^4.1.0"

Expand Down Expand Up @@ -6817,7 +6817,7 @@ regenerate@^1.4.0:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f"
integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==

regenerator-runtime@^0.13.4:
regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7:
version "0.13.7"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55"
integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==
Expand Down

0 comments on commit 94b3ce1

Please sign in to comment.