Skip to content

Commit b58e666

Browse files
add dummy test
add dummy jest test
2 parents ee8c31d + d15a718 commit b58e666

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2+
module.exports = {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
};

package.json

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,11 @@
3131
"execute:samples": "dev-tool samples run samples-dev",
3232
"extract-api": "tsc -p . && api-extractor run --local",
3333
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
34-
"integration-test:browser": "karma start --single-run",
35-
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 5000000 --full-trace \"dist-esm/test/{,!(browser)/**/}/*.spec.js\"",
36-
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
3734
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
3835
"lint": "eslint package.json api-extractor.json src test --ext .ts",
3936
"pack": "npm pack 2>&1",
4037
"prebuild": "npm run clean",
41-
"test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
42-
"test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node",
43-
"test": "npm run build:test && npm run unit-test && npm run integration-test",
44-
"unit-test:browser": "karma start --single-run",
45-
"unit-test:node": "mocha --require esm --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"dist-esm/test/{,!(browser)/**/}/*.spec.js\"",
46-
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
47-
"temp-unit-test": "mocha -r ts-node/register --timeout 1200000 test/node/*.spec.ts"
38+
"test": "jest"
4839
},
4940
"bin": {
5041
"mqtt_pub": "./bin/pub.js",
@@ -77,20 +68,16 @@
7768
"ws": "^8.2.0"
7869
},
7970
"devDependencies": {
80-
"@types/chai": "^4.1.6",
8171
"@types/collections": "^5.1.2",
8272
"@types/duplexify": "^3.6.0",
8373
"@types/end-of-stream": "^1.4.1",
84-
"@types/mocha": "^7.0.2",
8574
"@types/node": "^12.0.0",
8675
"@types/readable-stream": "^2.3.11",
8776
"@types/rfdc": "^1.2.0",
88-
"@types/sinon": "^9.0.4",
8977
"@types/ws": "^8.2.0",
9078
"aedes": "^0.46.1",
9179
"airtap": "^4.0.3",
9280
"browserify": "^17.0.0",
93-
"chai": "^4.3.4",
9481
"codecov": "^3.8.3",
9582
"collections": "^5.1.12",
9683
"duplexify": "^4.1.2",
@@ -101,16 +88,15 @@
10188
"eslint-plugin-node": "^11.1.0",
10289
"eslint-plugin-promise": "^5.1.0",
10390
"global": "^4.4.0",
91+
"jest": "^27.4.7",
10492
"mkdirp": "^1.0.4",
105-
"mocha": "^9.1.3",
10693
"mqtt-connection": "^4.1.0",
10794
"nyc": "^15.1.0",
10895
"rimraf": "^3.0.2",
10996
"rollup": "^1.16.3",
110-
"should": "^13.2.3",
111-
"sinon": "^11.1.2",
11297
"snazzy": "^9.0.0",
11398
"standard": "^16.0.4",
99+
"ts-jest": "^27.1.2",
114100
"ts-node": "^9.0.0",
115101
"tsdx": "^0.14.1",
116102
"typescript": "^4.4.3",

test/dummy.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('something', () => {
2+
it ('does thing', () => {
3+
expect(false).toBe(false);
4+
});
5+
});

0 commit comments

Comments
 (0)