Skip to content

Commit

Permalink
Merge pull request #7 from joyja/server-tests
Browse files Browse the repository at this point in the history
Added server tests and repaired code for passing integration tests. Also added stop method for server (to avoid jest hangups during testing), and added timer faking/checking.
  • Loading branch information
joyja committed Feb 9, 2020
2 parents 8275e01 + edc7193 commit 4e3ab9f
Show file tree
Hide file tree
Showing 20 changed files with 1,426 additions and 129 deletions.
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')
const { defaults } = require('jest-config')

module.exports = {
roots: [path.join(__dirname, './src')],
Expand All @@ -9,8 +10,7 @@ module.exports = {
coverageDirectory: path.join(__dirname, './coverage/'),
collectCoverageFrom: ['**/src/**/*.js'],
coveragePathIgnorePatterns: ['.*/__tests__/.*'],
// globalSetup: './test/setup.js',
// globalTeardown: './test/teardown.js',
moduleFileExtensions: [...defaults.moduleFileExtensions, 'graphql'],
watchPlugins: [
require.resolve('jest-watch-select-projects'),
require.resolve('jest-watch-typeahead/filename'),
Expand Down
8 changes: 6 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"graphql-request": "^1.8.2",
"jest": "^24.9.0",
"jest-watch-select-projects": "^1.0.0",
"jest-watch-typeahead": "^0.4.2",
Expand All @@ -41,9 +42,9 @@
"esm": "^3.2.25",
"ethernet-ip": "^1.2.5",
"express": "^4.17.1",
"graphql-request": "^1.8.2",
"graphql-yoga": "^1.18.3",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
"modbus-serial": "^7.7.4",
"mqtt": "^3.0.0",
"sparkplug-client": "^3.2.2",
Expand Down
Loading

0 comments on commit 4e3ab9f

Please sign in to comment.