Commit 31b9bbf9 authored by Egor Kremnev's avatar Egor Kremnev

rename test database. remove test log files

parent de749d46
......@@ -9,6 +9,6 @@ module.exports = {
uploadPath: path.join(rootPath, 'public', 'uploads'),
db: {
host: 'mongodb://127.0.0.1',
database: isTest ? 'shop-test' : 'shop',
database: isTest ? 'shop_test' : 'shop',
}
};
......@@ -4019,25 +4019,6 @@
"url": "https://github.com/sponsors/gregberge"
}
},
"node_modules/@testing-library/dom": {
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.2.0.tgz",
"integrity": "sha512-xTEnpUKiV/bMyEsE5bT4oYA0x0Z/colMtxzUY8bKyPXBNLn/e0V4ZjBZkEhms0xE4pv9QsPfSRu9AWS4y5wGvA==",
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.10.4",
"@babel/runtime": "^7.12.5",
"@types/aria-query": "^5.0.1",
"aria-query": "^5.0.0",
"chalk": "^4.1.0",
"dom-accessibility-api": "^0.5.9",
"lz-string": "^1.5.0",
"pretty-format": "^27.0.2"
},
"engines": {
"node": ">=14"
}
},
"node_modules/@testing-library/jest-dom": {
"version": "5.16.5",
"resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz",
......@@ -16333,19 +16314,6 @@
"is-typedarray": "^1.0.0"
}
},
"node_modules/typescript": {
"version": "4.9.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/unbox-primitive": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
......
......@@ -3,7 +3,8 @@ exports.config = {
helpers: {
Puppeteer: {
url: 'http://localhost:3010',
windowSize: '1200x900'
windowSize: '1200x900',
show: false
}
},
include: {
......
......@@ -6,7 +6,7 @@
"": {
"dependencies": {
"codeceptjs": "^3.4.1",
"puppeteer": "^20.7.0"
"puppeteer": "^20.7.2"
}
},
"node_modules/@babel/code-frame": {
......@@ -674,9 +674,9 @@
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
},
"node_modules/chromium-bidi": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.11.tgz",
"integrity": "sha512-p03ajLhlQ5gebw3cmbDBFmBc2wnJM5dnXS8Phu6mblGn/KQd76yOVL5VwE0VAisa7oazNfKGTaXlIZ8Q5Bb9OA==",
"version": "0.4.12",
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.12.tgz",
"integrity": "sha512-yl0ngMHtYUGJa2G0lkcbPvbnUZ9WMQyMNSfYmlrGD1nHRNyI9KOGw3dOaofFugXHHToneUaSmF9iUdgCBamCjA==",
"dependencies": {
"mitt": "3.0.0"
},
......@@ -969,14 +969,14 @@
}
},
"node_modules/degenerator": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/degenerator/-/degenerator-4.0.2.tgz",
"integrity": "sha512-HKwIFvZROUMfH3qI3gBpD61BYh7q3c3GXD5UGZzoVNJwVSYgZKvYl1fRMXc9ozoTxl/VZxKJ5v/bA+19tywFiw==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/degenerator/-/degenerator-4.0.3.tgz",
"integrity": "sha512-2wY8vmCfxrQpe2PKGYdiWRre5HQRwsAXbAAWRbC+z2b80MEpnWc8A3a9k4TwqwN3Z/Fm3uhNm5vYUZIbMhyRxQ==",
"dependencies": {
"ast-types": "^0.13.2",
"escodegen": "^1.8.1",
"esprima": "^4.0.0",
"vm2": "^3.9.17"
"vm2": "^3.9.19"
},
"engines": {
"node": ">= 14"
......@@ -2435,26 +2435,26 @@
}
},
"node_modules/puppeteer": {
"version": "20.7.0",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-20.7.0.tgz",
"integrity": "sha512-02Chkzyjm1e1PNb1wZ8q0ggfiIxh6+UAMeZR+tnyOT+yoSBYtLRMTCLEASOXNf8fDqMejO/AxTMbllShjngVng==",
"version": "20.7.2",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-20.7.2.tgz",
"integrity": "sha512-SKg9TgUY3TJvnOy0VrkhduSvDQIjBsi+s/Ne6S+qD53MM6emau+oh+kNqySNrT7c4qkg27UrJ9aEnltKDAQTzQ==",
"hasInstallScript": true,
"dependencies": {
"@puppeteer/browsers": "1.4.1",
"cosmiconfig": "8.2.0",
"puppeteer-core": "20.7.0"
"puppeteer-core": "20.7.2"
},
"engines": {
"node": ">=16.3.0"
}
},
"node_modules/puppeteer-core": {
"version": "20.7.0",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.7.0.tgz",
"integrity": "sha512-8RNYSMsLG9EkfACK/M9yh7yLul/eH6ZCghdhE2Ru6SjnEuHZZAksSrrI2NAm1BZb/JyI9dF7kxFhqY477q2V1A==",
"version": "20.7.2",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.7.2.tgz",
"integrity": "sha512-4Sd+v2YLlYMYFP/9SI/spT1joGTePwhmKP89pchUqz7VcWwv/Yh0Atmsybz+7wWT0VPDnw0UhBM6iNEfXEoUvg==",
"dependencies": {
"@puppeteer/browsers": "1.4.1",
"chromium-bidi": "0.4.11",
"chromium-bidi": "0.4.12",
"cross-fetch": "3.1.6",
"debug": "4.3.4",
"devtools-protocol": "0.0.1135028",
......@@ -2911,9 +2911,9 @@
}
},
"node_modules/vm2/node_modules/acorn": {
"version": "8.8.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
"integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz",
"integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==",
"bin": {
"acorn": "bin/acorn"
},
......
{
"dependencies": {
"codeceptjs": "^3.4.1",
"puppeteer": "^20.7.0"
"puppeteer": "^20.7.2"
},
"scripts": {
"start": "codeceptjs run --steps",
......
......@@ -3,12 +3,20 @@ REAL_PATH=`dirname $0`
cd $REAL_PATH
CURRENT_DIR=`pwd`
echo '# API'
cd $CURRENT_DIR/../api_client
echo '# Running fixtures'
npm run seed:test
echo '# Tests'
cd $CURRENT_DIR/../tests
npm start
echo "# Running tests"
npm run start
EXIT_CODE=$?
mongosh shop_test --eval "db.dropDatabase()"
exit 0
exit ${EXIT_CODE}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment