Skip to content

Commit

Permalink
👷 Add dependencies & configure jest to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPoblete committed Oct 1, 2024
1 parent cc0954a commit c2c42d3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-dapp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ jobs:
node-version: '18.18.2'

- name: Run jest tests
run: yarn test:dapp
run: yarn exec jest apps/dapp

3 changes: 3 additions & 0 deletions apps/dapp/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const createJestConfig = nextJest({
const customJestConfig = {
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
testEnvironment: "jsdom",
transform: {
'^.+\\.tsx?$': 'babel-jest',
}
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
Expand Down
5 changes: 4 additions & 1 deletion apps/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"react-redux": "^9.1.2"
},
"devDependencies": {
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@repo/eslint-config": "*",
"@repo/typescript-config": "*",
"@testing-library/jest-dom": "6.1.5",
Expand All @@ -45,10 +47,11 @@
"@types/node": "^20",
"@types/react": "18.2.45",
"@types/react-dom": "^18",
"babel-jest": "^29.7.0",
"eslint": "^8",
"eslint-config-next": "15.0.0-rc.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"typescript": "5.3.3"
}
}
}
75 changes: 5 additions & 70 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@
"@babel/helper-create-regexp-features-plugin" "^7.25.2"
"@babel/helper-plugin-utils" "^7.24.8"

"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.24.4":
"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.24.4", "@babel/preset-env@^7.25.4":
version "7.25.4"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.25.4.tgz#be23043d43a34a2721cd0f676c7ba6f1481f6af6"
integrity sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw==
Expand Down Expand Up @@ -995,7 +995,7 @@
"@babel/types" "^7.4.4"
esutils "^2.0.2"

"@babel/preset-typescript@^7.23.0":
"@babel/preset-typescript@^7.23.0", "@babel/preset-typescript@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz#66cd86ea8f8c014855671d5ea9a737139cbbfef1"
integrity sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==
Expand Down Expand Up @@ -1030,11 +1030,7 @@
core-js-pure "^3.30.2"
regenerator-runtime "^0.14.0"

<<<<<<< HEAD
"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.23.9", "@babel/runtime@^7.25.6", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7":
=======
"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.9", "@babel/runtime@^7.25.6", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
>>>>>>> 982eaac252b42a5427d128e56b02ed043997a7e5
"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.23.9", "@babel/runtime@^7.25.6", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
version "7.25.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2"
integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==
Expand Down Expand Up @@ -3439,8 +3435,6 @@
version "12.1.1"
resolved "https://registry.yarnpkg.com/@stellar/stellar-base/-/stellar-base-12.1.1.tgz#16a07e74995725c544510be7086723c28300ed11"
integrity sha512-gOBSOFDepihslcInlqnxKZdIW9dMUO1tpOm3AtJR33K2OvpXG6SaVHCzAmCFArcCqI9zXTEiSoh70T48TmiHJA==
<<<<<<< HEAD
=======
dependencies:
"@stellar/js-xdr" "^3.1.2"
base32.js "^0.1.0"
Expand All @@ -3451,37 +3445,6 @@
optionalDependencies:
sodium-native "^4.1.1"

"@stellar/[email protected]":
version "11.1.0"
resolved "https://registry.yarnpkg.com/@stellar/stellar-sdk/-/stellar-sdk-11.1.0.tgz#4a619fa645a7392204b6e80cb0a7f3ef94cdd077"
integrity sha512-Ufw+4udr7lqyzPIhqSAzBTgcl/YlgFZLgeBlDr5ZZy1v+g7AT4dOZFurcCrHt7Pz8DGtVcxNX7GLxYLdOC3GIg==
>>>>>>> 982eaac252b42a5427d128e56b02ed043997a7e5
dependencies:
"@stellar/js-xdr" "^3.1.2"
base32.js "^0.1.0"
bignumber.js "^9.1.2"
buffer "^6.0.3"
sha.js "^2.3.6"
tweetnacl "^1.0.3"
optionalDependencies:
sodium-native "^4.1.1"

<<<<<<< HEAD
=======
"@stellar/[email protected]":
version "11.3.0"
resolved "https://registry.yarnpkg.com/@stellar/stellar-sdk/-/stellar-sdk-11.3.0.tgz#7cb010651846a07e1853e0fe30e430ece4da340b"
integrity sha512-i+heopibJNRA7iM8rEPz0AXphBPYvy2HDo8rxbDwWpozwCfw8kglP9cLkkhgJe8YicgLrdExz/iQZaLpqLC+6w==
dependencies:
"@stellar/stellar-base" "^11.0.1"
axios "^1.6.8"
bignumber.js "^9.1.2"
eventsource "^2.0.2"
randombytes "^2.1.0"
toml "^3.0.0"
urijs "^1.19.1"

>>>>>>> 982eaac252b42a5427d128e56b02ed043997a7e5
"@stellar/[email protected]", "@stellar/stellar-sdk@^12.1.0":
version "12.2.0"
resolved "https://registry.yarnpkg.com/@stellar/stellar-sdk/-/stellar-sdk-12.2.0.tgz#c449bc52be282c7706aabbd257acbc5aec3345b3"
Expand Down Expand Up @@ -4311,7 +4274,7 @@
dependencies:
"@swc/counter" "^0.1.3"

"@testing-library/dom@^9.3.4":
"@testing-library/dom@^9.0.0", "@testing-library/dom@^9.3.4":
version "9.3.4"
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.4.tgz#50696ec28376926fec0a1bf87d9dbac5e27f60ce"
integrity sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==
Expand Down Expand Up @@ -4352,8 +4315,6 @@
lodash "^4.17.21"
redent "^3.0.0"

<<<<<<< HEAD
=======
"@testing-library/[email protected]":
version "14.1.2"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.1.2.tgz#a2b9e9ee87721ec9ed2d7cfc51cc04e474537c32"
Expand All @@ -4363,16 +4324,6 @@
"@testing-library/dom" "^9.0.0"
"@types/react-dom" "^18.0.0"

"@testing-library/react@^14.0.0":
version "14.3.1"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.3.1.tgz#29513fc3770d6fb75245c4e1245c470e4ffdd830"
integrity sha512-H99XjUhWQw0lTgyMN05W3xQG1Nh4lq574D8keFf1dDoNTJgp66VbJozRaczoF+wsiaPJNt/TcnfpLGufGxSrZQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@testing-library/dom" "^9.0.0"
"@types/react-dom" "^18.0.0"

>>>>>>> 982eaac252b42a5427d128e56b02ed043997a7e5
"@testing-library/user-event@^14.5.2":
version "14.5.2"
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.5.2.tgz#db7257d727c891905947bd1c1a99da20e03c2ebd"
Expand Down Expand Up @@ -4820,7 +4771,7 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==

"@types/react-dom@^18", "@types/react-dom@^18.2.19":
"@types/react-dom@^18", "@types/react-dom@^18.0.0", "@types/react-dom@^18.2.19":
version "18.3.0"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0"
integrity sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==
Expand Down Expand Up @@ -5994,11 +5945,7 @@ axe-core@^4.10.0:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59"
integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==

<<<<<<< HEAD
axios@^1.7.2, axios@^1.7.7:
=======
axios@^1.6.0, axios@^1.6.8, axios@^1.7.2, axios@^1.7.7:
>>>>>>> 982eaac252b42a5427d128e56b02ed043997a7e5
version "1.7.7"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f"
integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==
Expand Down Expand Up @@ -11172,8 +11119,6 @@ [email protected], jest@^29.7.0:
import-local "^3.0.2"
jest-cli "^29.7.0"

<<<<<<< HEAD
=======
jest@^25.3.0:
version "25.5.4"
resolved "https://registry.yarnpkg.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db"
Expand All @@ -11183,12 +11128,6 @@ jest@^25.3.0:
import-local "^3.0.2"
jest-cli "^25.5.4"

jiti@^1.21.0:
version "1.21.6"
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268"
integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==

>>>>>>> 982eaac252b42a5427d128e56b02ed043997a7e5
jju@~1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a"
Expand Down Expand Up @@ -12807,11 +12746,7 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==

<<<<<<< HEAD
"prettier-fallback@npm:prettier@^3", prettier@^3.1.1, prettier@^3.2.5:
=======
"prettier-fallback@npm:prettier@^3", prettier@^3.0.3, prettier@^3.1.1, prettier@^3.2.5:
>>>>>>> 982eaac252b42a5427d128e56b02ed043997a7e5
version "3.3.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==
Expand Down

0 comments on commit c2c42d3

Please sign in to comment.