Skip to content

Commit

Permalink
Update tests to include logging tests
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Mar 28, 2024
1 parent eeccb67 commit b461a4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"lint": "eslint -c .eslintrc \"*.js\" \"lib/**/*.js\" \"frontend/**/*.js\" \"frontend/**/*.html\" \"test/**/*.js\"",
"lint:fix": "eslint -c .eslintrc \"*.js\" \"lib/**/*.js\" \"frontend/**/*.js\" \"frontend/**/*.html\" \"test/**/*.js\" --fix",
"test": "npm run test:lib && npm run test:frontend",
"test:lib": "mocha test/unit/**/*_spec.js",
"test:frontend": "mocha test/unit/frontend/**/*.spec.js"
"test:lib": "mocha 'test/unit/**/*_spec.js'",
"test:frontend": "mocha 'test/unit/frontend/**/*.spec.js'"
},
"bin": {
"flowforge-device-agent": "./index.js",
Expand Down
7 changes: 1 addition & 6 deletions test/unit/lib/logging/log_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ describe('Log', function () {
msg: 'm5'
}))
Log.info('m6')
Log.NRlog(JSON.stringify({
level: 'info',
ts: Date.now(),
msg: 'm7'
}))

Log.NRlog('m7')
const bufferedMessages = Log.getBufferedMessages()
// Verify we buffered the last 5
bufferedMessages.should.have.length(5)
Expand Down

0 comments on commit b461a4f

Please sign in to comment.