Skip to content

Commit

Permalink
update dep vers
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 28, 2024
1 parent ccd5cdf commit ac4d6fb
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 34 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"prettier:fix": "npm run prettier -- --write",
"start": "NODE_ENV=production node ./server",
"develop": "NODE_ENV=development node ./server",
"test": "test/run.sh",
"test": "test.sh",
"versions": "npx dependency-version-checker check",
"watch": "node --no-warnings=ExperimentalWarning test/suite setup && node --test --watch --no-warnings=ExperimentalWarning; node --no-warnings=ExperimentalWarning test/suite teardown"
"watch": "test.sh watch"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -43,10 +43,10 @@
"@hapi/hoek": "^11.0.4",
"@hapi/inert": "^7.1.0",
"@hapi/vision": "^7.0.3",
"@nictool/validate": "^0.7.1",
"@nictool/validate": "^0.7.2",
"hapi-swagger": "^17.2.1",
"mysql2": "^3.9.1",
"mysql2": "^3.9.2",
"qs": "^6.11.2",
"yaml": "^2.3.4"
"yaml": "^2.4.0"
}
}
4 changes: 3 additions & 1 deletion routes/group.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import User from '../lib/user.js'
import groupCase from './test/group.json' with { type: 'json' }
import userCase from './test/user.json' with { type: 'json' }

let server, sessionCookie
let server

before(async () => {
server = await init()
Expand All @@ -21,6 +21,8 @@ after(async () => {
})

describe('group routes', () => {
let sessionCookie

it('POST /session establishes a session', async () => {
const res = await server.inject({
method: 'POST',
Expand Down
14 changes: 7 additions & 7 deletions test/suite.js → test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import path from 'node:path'

import Group from '../lib/group.js'
import User from '../lib/user.js'
import Session from '../lib/session.js'
import Group from './lib/group.js'
import User from './lib/user.js'
import Session from './lib/session.js'

import groupCase from '../lib/test/group.json' with { type: 'json' }
import userCase from '../lib/test/user.json' with { type: 'json' }
import groupCaseR from '../routes/test/group.json' with { type: 'json' }
import userCaseR from '../routes/test/user.json' with { type: 'json' }
import groupCase from './lib/test/group.json' with { type: 'json' }
import userCase from './lib/test/user.json' with { type: 'json' }
import groupCaseR from './routes/test/group.json' with { type: 'json' }
import userCaseR from './routes/test/user.json' with { type: 'json' }

switch (process.argv[2]) {
case 'setup':
Expand Down
12 changes: 12 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

node --no-warnings=ExperimentalWarning test.js setup

if [ "$1" = "watch" ]; then
node --no-warnings=ExperimentalWarning --test --watch
else
node --no-warnings=ExperimentalWarning --test
# npx mocha --exit --no-warnings=ExperimentalWarning lib/*.test.js routes/*.test.js
fi

node --no-warnings=ExperimentalWarning test.js teardown
5 changes: 0 additions & 5 deletions test/run.sh

This file was deleted.

6 changes: 0 additions & 6 deletions test/v2/group.json

This file was deleted.

10 changes: 0 additions & 10 deletions test/v2/user.json

This file was deleted.

0 comments on commit ac4d6fb

Please sign in to comment.