add npm command to test matching and notification services
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
"setup": "docker build -t marketalerts . && docker run -e POSTGRES_USER=docker -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=marketalerts --name pg_marketalerts -d -p 5432:5432 marketalerts && sleep 4 && npm run migrate",
|
||||
"docker-start": "docker start pg_marketalerts",
|
||||
"docker-stop": "docker stop pg_marketalerts",
|
||||
"crawl": "cd app/crawler && node npmCrawl.js"
|
||||
"crawl": "cd app/crawler && node npmCrawl.js",
|
||||
"test-search": "cd test && node searchTest.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
13
test/searchTest.js
Normal file
13
test/searchTest.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const { getRealEstateById } = require("../app/helpers/db/realEstate");
|
||||
const {
|
||||
findSearchRequestsForRealEstate
|
||||
} = require("../app/helpers/db/searchRequest");
|
||||
|
||||
(async () => {
|
||||
const realEstate = await getRealEstateById(53069);
|
||||
const searchRequestsForRealEstate = await findSearchRequestsForRealEstate(
|
||||
realEstate
|
||||
);
|
||||
|
||||
console.log(searchRequestsForRealEstate);
|
||||
})();
|
||||
Reference in New Issue
Block a user