Skip to content

Commit

Permalink
adding server_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
recap committed May 28, 2024
1 parent 9ba2818 commit 1403ffc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions server_test/test_db_writes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//const fs = require('fs')
const db = require('../data/userdb.json')
const redirectedUsers = require('./redirected_users.json')
//
//const dbFile = '../data/userdb.json'

//const db = JSON.parse(fs.readFileSync(dbFile))

//console.log(db)
//console.log(redirectedUsers)

const userIds = db.map(u => {
return u.userId
})

redirectedUsers.forEach(u => {
if(!userIds.includes(u)) {
console.log(`${u} not in DB`)
} else {
//console.log(u)
}
})
File renamed without changes.
File renamed without changes.

0 comments on commit 1403ffc

Please sign in to comment.